diff --git a/src/osd/windows/window.c b/src/osd/windows/window.c index 2fbacb8b780..1ffdc361f9a 100644 --- a/src/osd/windows/window.c +++ b/src/osd/windows/window.c @@ -601,13 +601,14 @@ void winwindow_update_cursor_state(running_machine &machine) assert(GetCurrentThreadId() == main_threadid); - // if we should hide the mouse, then do it + // if we should hide the mouse cursor, then do it // rules are: // 1. we must have focus before hiding the cursor // 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 (downcast(machine.options()).hide_cursor() && + 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; diff --git a/src/osd/windows/winmain.c b/src/osd/windows/winmain.c index 953b2e5c9ba..3e43305d880 100644 --- a/src/osd/windows/winmain.c +++ b/src/osd/windows/winmain.c @@ -428,6 +428,7 @@ const options_entry windows_options::s_option_entries[] = // input options { NULL, NULL, OPTION_HEADER, "INPUT DEVICE OPTIONS" }, + { WINOPTION_HIDE_CURSOR ";hc", "1", OPTION_BOOLEAN, "hide cursor in full screen or if mouse is enabled" }, { WINOPTION_DUAL_LIGHTGUN ";dual", "0", OPTION_BOOLEAN, "enable dual lightgun input" }, { NULL } diff --git a/src/osd/windows/winmain.h b/src/osd/windows/winmain.h index d8e54993df8..c1d36aefaba 100644 --- a/src/osd/windows/winmain.h +++ b/src/osd/windows/winmain.h @@ -148,6 +148,7 @@ #define WINOPTION_AUDIO_LATENCY "audio_latency" // input options +#define WINOPTION_HIDE_CURSOR "hide_cursor" #define WINOPTION_DUAL_LIGHTGUN "dual_lightgun" @@ -267,6 +268,7 @@ public: int audio_latency() const { return int_value(WINOPTION_AUDIO_LATENCY); } // input options + bool hide_cursor() const { return bool_value(WINOPTION_HIDE_CURSOR); } bool dual_lightgun() const { return bool_value(WINOPTION_DUAL_LIGHTGUN); } private: