shithub: choc

Download patch

ref: 030b38de23f85b129e357ed97e2a58e21391fe92
parent: 94bca7e14e0a245d6fcb06335dc244bb6181a519
author: Simon Howard <[email protected]>
date: Fri Dec 14 17:23:13 EST 2007

Don't grab the mouse if the mouse is disabled by -nomouse or through
use_mouse in the configuration file (thanks MikeRS).

Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 990

--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,8 @@
     Bugs fixed:
      * Desync with STRAIN demos and dehacked Misc values not being 
        set properly (thanks Lemonzest)
+     * Don't grab the mouse if the mouse is disabled via -nomouse
+       or use_mouse in the configuration file (thanks MikeRS).
 
 1.0.0 (2007-12-10):
 
--- a/src/i_video.c
+++ b/src/i_video.c
@@ -171,6 +171,11 @@
     if (fullscreen != FULLSCREEN_OFF)
         return true;
 
+    // Don't grab the mouse if mouse input is disabled
+
+    if (!usemouse || nomouse)
+        return false;
+
     // Drone players don't need mouse focus
 
     if (drone)