X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=vid_wgl.c;h=c52d0d99e8bfd6bd24bfbd8a67eebe8d1478967f;hb=a8a5761f26df36094725cbfa09218885ccfc2d1d;hp=a06465d1f32eda83d1de0293e52875b9450577d4;hpb=d9919887fed8a056fb3437562d649baf8ced2297;p=xonotic%2Fdarkplaces.git diff --git a/vid_wgl.c b/vid_wgl.c index a06465d1..c52d0d99 100644 --- a/vid_wgl.c +++ b/vid_wgl.c @@ -24,9 +24,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "quakedef.h" #include +#include #include #include "resource.h" #include +#include extern void S_BlockSound (void); extern void S_UnblockSound (void); @@ -115,8 +117,6 @@ static qboolean dinput; // input code -#include - #define DINPUT_BUFFERSIZE 16 #define iDirectInputCreate(a,b,c,d) pDirectInputCreate(a,b,c,d) @@ -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++)