summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Michaël Banaan Ananas <happppp@users.noreply.github.com>2011-10-10 18:37:18 +0000
committer Michaël Banaan Ananas <happppp@users.noreply.github.com>2011-10-10 18:37:18 +0000
commit325dc41b5d0908532935722c267b168c2a880eb9 (patch)
tree60f34fb71c0234cdee730f016f8cf0fb5c692cdf
parentaa470d1617a45af60d6faa5787d62084bd3d525c (diff)
revert r14152, good idea but please add a -grabcursor option instead
-rw-r--r--src/osd/windows/window.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/osd/windows/window.c b/src/osd/windows/window.c
index 4f06663c5bf..2fbacb8b780 100644
--- a/src/osd/windows/window.c
+++ b/src/osd/windows/window.c
@@ -601,10 +601,13 @@ void winwindow_update_cursor_state(running_machine &machine)
assert(GetCurrentThreadId() == main_threadid);
- // Hide the mouse, if
- // We have focus AND -nowindow AND -nomenu AND -nomouse
- //
- if (winwindow_has_focus() && (!video_config.windowed && !win_has_menu(win_window_list)) && !machine.options().mouse())
+ // if we should hide the mouse, 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())))
{
win_window_info *window = win_window_list;
RECT bounds;