Made UI mouse cursor optional (default is off for now), in games with clickable artwork cursor is visible, application is not taking mouse control anymore (no whatsnew)

This commit is contained in:
Miodrag Milanovic 2012-08-17 13:42:21 +00:00
parent 9ce1175a04
commit 10294b81ab
4 changed files with 6 additions and 4 deletions

View File

@ -193,6 +193,7 @@ const options_entry emu_options::s_option_entries[] =
{ OPTION_UI_FONT, "default", OPTION_STRING, "specify a font to use" },
{ OPTION_RAMSIZE ";ram", NULL, OPTION_STRING, "size of RAM (if supported by driver)" },
{ OPTION_CONFIRM_QUIT, "0", OPTION_BOOLEAN, "display confirm quit screen on exit" },
{ OPTION_UI_MOUSE, "0", OPTION_BOOLEAN, "display ui mouse cursor" },
{ NULL }
};

View File

@ -196,6 +196,7 @@ enum
#define OPTION_RAMSIZE "ramsize"
#define OPTION_CONFIRM_QUIT "confirm_quit"
#define OPTION_UI_MOUSE "ui_mouse"
//**************************************************************************
@ -347,7 +348,8 @@ public:
const char *ui_font() const { return value(OPTION_UI_FONT); }
const char *ram_size() const { return value(OPTION_RAMSIZE); }
bool confirm_quit() const { return bool_value(OPTION_CONFIRM_QUIT); }
bool confirm_quit() const { return bool_value(OPTION_CONFIRM_QUIT); }
bool ui_mouse() const { return bool_value(OPTION_UI_MOUSE); }
// device-specific options
const char *device_option(device_image_interface &image);

View File

@ -437,7 +437,7 @@ void ui_update_and_render(running_machine &machine, render_container *container)
else
popup_text_end = 0;
if (ui_mouse_show || ui_is_menu_active())
if (ui_mouse_show || (machine.options().ui_mouse() && ui_is_menu_active()))
{
INT32 mouse_target_x, mouse_target_y;
int mouse_button;

View File

@ -607,8 +607,7 @@ void winwindow_update_cursor_state(running_machine &machine)
// 2. we also hide the cursor in full screen mode and when the window doesn't have a menu
// 3. we also hide the cursor in windowed mode if we're not paused and
// the input system requests it
//if (winwindow_has_focus() && ((!video_config.windowed && !win_has_menu(win_window_list)) || (!machine.paused() && wininput_should_hide_mouse())))
if (winwindow_has_focus())
if (winwindow_has_focus() && ((!video_config.windowed && !win_has_menu(win_window_list)) || (!machine.paused() && wininput_should_hide_mouse())))
{
win_window_info *window = win_window_list;
RECT bounds;