]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - vid_wgl.c
modified gamma handling, now VID_UpdateGamma is only called from VID_Finish, and...
[xonotic/darkplaces.git] / vid_wgl.c
index 1b05d59d007b7cfbd19fa02d8644d7a125c0e6db..1e5a738271e703cd4ccf773f200cc3445ad9048d 100644 (file)
--- a/vid_wgl.c
+++ b/vid_wgl.c
@@ -289,6 +289,8 @@ void VID_Finish (qboolean allowmousegrab)
                        qglFinish();
                SwapBuffers(baseDC);
        }
+
+       VID_UpdateGamma(false, 256);
 }
 
 //==========================================================================
@@ -647,7 +649,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 +657,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);