summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Michaël Banaan Ananas <happppp@users.noreply.github.com>2011-10-10 19:45:31 +0000
committer Michaël Banaan Ananas <happppp@users.noreply.github.com>2011-10-10 19:45:31 +0000
commit6ee05f83d3bc6f28dd947932dfbd1b61ada0b92d (patch)
tree56f2c81d2f68a418c08f8b0384cada77839f2bd2
parentb524032df4e359166a525aa8b745896e419e45cb (diff)
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
-rw-r--r--src/osd/windows/window.c5
-rw-r--r--src/osd/windows/winmain.c1
-rw-r--r--src/osd/windows/winmain.h2
3 files changed, 6 insertions, 2 deletions
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<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;
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: