ref: c80600ef2c0ded9c51ebd0f169972149956d939b
parent: 43748a366a4bc5494c15995273bfe158530e03de
author: Simon Howard <[email protected]>
date: Fri Jun 12 13:34:27 EDT 2009
Always grab input on Windows CE. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1597
--- a/src/i_video.c
+++ b/src/i_video.c
@@ -182,7 +182,7 @@
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;
@@ -193,6 +193,17 @@
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)
@@ -204,12 +215,12 @@
return false;
// if we specify not to grab the mouse, never grab
-
+
if (!grabmouse)
return false;
// when menu is active or game is paused, release the mouse
-
+
if (menuactive || paused)
return false;
@@ -216,6 +227,8 @@
// only grab mouse when playing levels (but not demos)
return (gamestate == GS_LEVEL) && !demoplayback;
+
+#endif /* #ifndef _WIN32_WCE */
}
// Update the value of window_focused when we get a focus event