]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
changed VID_Finish to take an allowmousegrab parameter, this avoids mousegrab on...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 11 Mar 2006 17:24:10 +0000 (17:24 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 11 Mar 2006 17:24:10 +0000 (17:24 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6103 d7cf8633-e32d-0410-b094-e92efae38249

gl_backend.c
vid.h
vid_agl.c
vid_glx.c
vid_null.c
vid_sdl.c
vid_wgl.c

index 5d63a28a7a82da5b5ae973c54800bebdade3be35..0b7121d7d573c9c6c085290b0d108863ed307308 100644 (file)
@@ -1871,7 +1871,7 @@ void SCR_UpdateLoadingScreen (void)
        GL_LockArrays(0, 0);
        R_Mesh_Finish();
        // refresh
-       VID_Finish();
+       VID_Finish(false);
 }
 
 /*
@@ -1949,7 +1949,7 @@ void SCR_UpdateScreen (void)
        else
                SCR_DrawScreen();
 
-       VID_Finish();
+       VID_Finish(true);
        if (r_timereport_active)
                R_TimeReport("finish");
 }
diff --git a/vid.h b/vid.h
index 6943a8541f8456b0a687fd2b9ab3f07f5f7838ff..c2b3e1f1e59343188d0d4dee8416504416c40729 100644 (file)
--- a/vid.h
+++ b/vid.h
@@ -136,7 +136,7 @@ int VID_GetGamma (unsigned short *ramps);
 void VID_UpdateGamma(qboolean force);
 void VID_RestoreSystemGamma(void);
 
-void VID_Finish (void);
+void VID_Finish (qboolean allowmousegrab);
 
 void VID_Restart_f(void);
 
index fb4860b0fbfc45494803d27c5945b3a3acc76950..604c0a19a3ad717725ced6347eff11ac2984333b 100644 (file)
--- a/vid_agl.c
+++ b/vid_agl.c
@@ -101,14 +101,14 @@ static void IN_Activate( qboolean grab )
        }
 }
 
-void VID_Finish (void)
+void VID_Finish (qboolean allowmousegrab)
 {
        qboolean vid_usemouse;
        qboolean vid_usevsync;
-       
+
        // handle the mouse state when windowed if that's changed
        vid_usemouse = false;
-       if (vid_mouse.integer && !key_consoleactive && !cls.demoplayback)
+       if (allowmousgrab && vid_mouse.integer && !key_consoleactive && !cls.demoplayback)
                vid_usemouse = true;
        if (!vid_activewindow)
                vid_usemouse = false;
@@ -171,7 +171,7 @@ int VID_GetGamma(unsigned short *ramps)
        CGGammaValue table_blue [GAMMA_TABLE_SIZE];
        CGTableCount actualsize = 0;
        unsigned int i;
-       
+
        // Get the gamma ramps from the system
        if (CGGetDisplayTransferByTable(CGMainDisplayID(), GAMMA_TABLE_SIZE, table_red, table_green, table_blue, &actualsize) != CGDisplayNoErr)
        {
index 84a16a846d750183b3839fc2494043d45f0d6f10..c510104106e5e117785b129148da2c3a8f859b4c 100644 (file)
--- a/vid_glx.c
+++ b/vid_glx.c
@@ -559,7 +559,7 @@ void InitSig(void)
        signal(SIGTERM, signal_handler);
 }
 
-void VID_Finish (void)
+void VID_Finish (qboolean allowmousegrab)
 {
        qboolean vid_usemouse;
 
@@ -573,7 +573,7 @@ void VID_Finish (void)
 
 // handle the mouse state when windowed if that's changed
        vid_usemouse = false;
-       if (vid_mouse.integer && !key_consoleactive && !cls.demoplayback)
+       if (allowmousegrab && vid_mouse.integer && !key_consoleactive && !cls.demoplayback)
                vid_usemouse = true;
        if (!vid_activewindow)
                vid_usemouse = false;
index 41be51fab82ee2bf756314c48cfdd21ca4493321..85d18cda45da2be3e90148a6486177e183fe0cba 100644 (file)
@@ -51,7 +51,7 @@ void InitSig(void)
 #endif
 }
 
-void VID_Finish (void)
+void VID_Finish (qboolean allowmousegrab)
 {
 }
 
index 6f59ad305cadc81915fb604ba7f2b8db0431f09f..65d4bcb7913e0d54468477ba481499d0a3e47b92 100644 (file)
--- a/vid_sdl.c
+++ b/vid_sdl.c
@@ -483,7 +483,7 @@ int VID_GetGamma (unsigned short *ramps)
        return !SDL_GetGammaRamp( ramps, ramps + 256, ramps + 512);
 }
 
-void VID_Finish (void)
+void VID_Finish (qboolean allowmousegrab)
 {
        Uint8 appstate;
        qboolean vid_usemouse;
@@ -503,7 +503,7 @@ void VID_Finish (void)
                vid_activewindow = true;
 
        vid_usemouse = false;
-       if( vid_mouse.integer && !key_consoleactive && !cls.demoplayback )
+       if( allowmousegrab && vid_mouse.integer && !key_consoleactive && !cls.demoplayback )
                vid_usemouse = true;
        if( vid_isfullscreen )
                vid_usemouse = true;
index 22f465201413369afd0299306562248c849e9577..a06465d1f32eda83d1de0293e52875b9450577d4 100644 (file)
--- a/vid_wgl.c
+++ b/vid_wgl.c
@@ -262,7 +262,7 @@ static void IN_StartupMouse (void);
 
 //====================================
 
-void VID_Finish (void)
+void VID_Finish (qboolean allowmousegrab)
 {
        qboolean vid_usemouse;
 
@@ -275,7 +275,7 @@ void VID_Finish (void)
 
 // handle the mouse state when windowed if that's changed
        vid_usemouse = false;
-       if (vid_mouse.integer && !key_consoleactive && !cls.demoplayback)
+       if (allowmousegrab && vid_mouse.integer && !key_consoleactive && !cls.demoplayback)
                vid_usemouse = true;
        if (vid_isfullscreen)
                vid_usemouse = true;