hide_cursor option for chess games and clickable artwork and such.

default to on means exactly the same behaviour as it was before, off means mousecursor is _always_ shown
This commit is contained in:
Michaël Banaan Ananas 2011-10-10 19:45:31 +00:00
parent b524032df4
commit 6ee05f83d3
3 changed files with 6 additions and 2 deletions

View File

@ -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<windows_options &>(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;

View File

@ -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 }

View File

@ -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: