summaryrefslogtreecommitdiff
path: root/src/i_video.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/i_video.c')
-rw-r--r--src/i_video.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/i_video.c b/src/i_video.c
index a41f523b..a938b1f8 100644
--- a/src/i_video.c
+++ b/src/i_video.c
@@ -266,7 +266,7 @@ static boolean MouseShouldBeGrabbed()
if (screensaver_mode)
return false;
- // if the window doesnt have focus, never grab it
+ // if the window doesn't have focus, never grab it
if (!window_focused)
return false;
@@ -277,13 +277,24 @@ static boolean MouseShouldBeGrabbed()
if (fullscreen)
return true;
+#ifdef _WIN32_WCE
+
+ // On Windows CE, always grab input. This is because hardware
+ // button events are only acquired by SDL when the input is grabbed.
+ // Almost all Windows CE devices should have touch screens anyway,
+ // so this shouldn't affect mouse grabbing behavior.
+
+ return true;
+
+#else
+
// Don't grab the mouse if mouse input is disabled
if (!usemouse || nomouse)
return false;
// if we specify not to grab the mouse, never grab
-
+
if (!grabmouse)
return false;
@@ -298,6 +309,8 @@ static boolean MouseShouldBeGrabbed()
{
return true;
}
+
+#endif /* #ifndef _WIN32_WCE */
}
void I_SetGrabMouseCallback(grabmouse_callback_t func)