shithub: choc

Download patch

ref: 11af5396a479d804045ce3286c9c34eddf1fd7b7
parent: c3208e4f1648b7d4c3c19f88cebb935a0021252e
author: Simon Howard <fraggle@gmail.com>
date: Tue Sep 19 17:26:52 EDT 2006

Move the grab mouse setting to the mouse config dialog.

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

--- a/setup/display.c
+++ b/setup/display.c
@@ -47,7 +47,6 @@
 static int vidmode = 0;
 static int fullscreen = 0;
 static int screenmult = 1;
-static int grabmouse = 1;
 
 // Given the video settings (fullscreen, screenmult, etc), find the
 // current video mode
@@ -117,8 +116,5 @@
     }
 
     TXT_AddWidget(window, table);
-
-    TXT_AddWidget(window, TXT_NewSeparator(NULL));
-    TXT_AddWidget(window, TXT_NewCheckBox("Grab mouse", &grabmouse));
 }
 
--- a/setup/mouse.c
+++ b/setup/mouse.c
@@ -28,6 +28,7 @@
 int speed;
 int accel;
 int threshold;
+int grabmouse = 1;
 
 int mouseb_fire = 0;
 int mouseb_forward = 1;
@@ -97,12 +98,15 @@
     AddMouseControl(table, "Strafe on", &mouseb_strafe);
     
     TXT_AddWidget(window, table);
-    
-    TXT_AddWidget(window, TXT_NewSeparator(NULL));
 
+    TXT_AddWidget(window, TXT_NewSeparator("Misc."));
+
     TXT_AddWidget(window, 
                   TXT_NewInvertedCheckBox("Allow vertical mouse movement", 
                                           &novert));
+    TXT_AddWidget(window, TXT_NewCheckBox("Grab mouse in windowed mode", 
+                                          &grabmouse));
 
+    
 }