]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - vid_wgl.c
fixed sv_waterfriction code so it is now used
[xonotic/darkplaces.git] / vid_wgl.c
index 1b05d59d007b7cfbd19fa02d8644d7a125c0e6db..c52d0d99e8bfd6bd24bfbd8a67eebe8d1478967f 100644 (file)
--- a/vid_wgl.c
+++ b/vid_wgl.c
@@ -275,7 +275,7 @@ void VID_Finish (qboolean allowmousegrab)
 
 // handle the mouse state when windowed if that's changed
        vid_usemouse = false;
-       if (allowmousegrab && vid_mouse.integer && !key_consoleactive && !cls.demoplayback)
+       if (allowmousegrab && vid_mouse.integer && !key_consoleactive && (key_dest != key_game || !cls.demoplayback))
                vid_usemouse = true;
        if (vid_isfullscreen)
                vid_usemouse = true;
@@ -285,10 +285,15 @@ void VID_Finish (qboolean allowmousegrab)
 
        if (r_render.integer && !vid_hidden)
        {
+               CHECKGLERROR
                if (r_speeds.integer || gl_finish.integer)
-                       qglFinish();
+               {
+                       qglFinish();CHECKGLERROR
+               }
                SwapBuffers(baseDC);
        }
+
+       VID_UpdateGamma(false, 256);
 }
 
 //==========================================================================
@@ -647,7 +652,7 @@ LONG WINAPI MainWndProc (HWND hWnd, UINT uMsg, WPARAM  wParam, LPARAM lParam)
        return lRet;
 }
 
-int VID_SetGamma(unsigned short *ramps)
+int VID_SetGamma(unsigned short *ramps, int rampsize)
 {
        HDC hdc = GetDC (NULL);
        int i = SetDeviceGammaRamp(hdc, ramps);
@@ -655,7 +660,7 @@ int VID_SetGamma(unsigned short *ramps)
        return i; // return success or failure
 }
 
-int VID_GetGamma(unsigned short *ramps)
+int VID_GetGamma(unsigned short *ramps, int rampsize)
 {
        HDC hdc = GetDC (NULL);
        int i = GetDeviceGammaRamp(hdc, ramps);
@@ -1623,7 +1628,7 @@ static void IN_JoyMove (void)
        else
                speed = 1;
        // LordHavoc: viewzoom affects sensitivity for sniping
-       aspeed = speed * host_realframetime * cl.viewzoom;
+       aspeed = speed * cl.realframetime * cl.viewzoom;
 
        // loop through the axes
        for (i = 0; i < JOY_MAX_AXES; i++)