]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - vid_wgl.c
added back the old method of comparing points to the parent planes,
[xonotic/darkplaces.git] / vid_wgl.c
index 1b6a27a1ef6624baac3a9d5b0acb1d4b1c7a37f2..0133c09641a7cf691962ce31237135539f0c7ba0 100644 (file)
--- a/vid_wgl.c
+++ b/vid_wgl.c
@@ -250,8 +250,8 @@ static void IN_StartupMouse (void);
 
 void VID_Finish (void)
 {
-       vid_usevsync = vid_vsync.integer && !cls.timedemo && gl_videosyncavailable;
-       if (vid_usingvsync != vid_usevsync && gl_videosyncavailable)
+       vid_usevsync = vid_vsync.integer && !cls.timedemo && qwglSwapIntervalEXT;
+       if (vid_usingvsync != vid_usevsync)
        {
                vid_usingvsync = vid_usevsync;
                qwglSwapIntervalEXT (vid_usevsync);
@@ -1102,7 +1102,7 @@ qboolean VID_InitMode(viddef_mode_t *mode)
                mainwindow = CreateWindowEx (ExWindowStyle, "DarkPlacesWindowClass", gamename, WindowStyle, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, NULL, NULL, global_hInstance, NULL);
                if (!mainwindow)
                {
-                       Con_Printf("CreateWindowEx(%d, %s, %s, %d, %d, %d, %d, %d, %p, %p, %d, %p) failed\n", (int)ExWindowStyle, "DarkPlacesWindowClass", gamename, (int)WindowStyle, (int)(rect.left), (int)(rect.top), (int)(rect.right - rect.left), (int)(rect.bottom - rect.top), NULL, NULL, (int)global_hInstance, NULL);
+                       Con_Printf("CreateWindowEx(%d, %s, %s, %d, %d, %d, %d, %d, %p, %p, %p, %p) failed\n", (int)ExWindowStyle, "DarkPlacesWindowClass", gamename, (int)WindowStyle, (int)(rect.left), (int)(rect.top), (int)(rect.right - rect.left), (int)(rect.bottom - rect.top), NULL, NULL, global_hInstance, NULL);
                        VID_Shutdown();
                        return false;
                }
@@ -1115,14 +1115,14 @@ qboolean VID_InitMode(viddef_mode_t *mode)
                if (!pixelformat)
                {
                        VID_Shutdown();
-                       Con_Printf("ChoosePixelFormat(%d, %p) failed\n", (int)baseDC, &pfd);
+                       Con_Printf("ChoosePixelFormat(%p, %p) failed\n", baseDC, &pfd);
                        return false;
                }
 
                if (SetPixelFormat(baseDC, pixelformat, &pfd) == false)
                {
                        VID_Shutdown();
-                       Con_Printf("SetPixelFormat(%d, %d, %p) failed\n", (int)baseDC, pixelformat, &pfd);
+                       Con_Printf("SetPixelFormat(%p, %d, %p) failed\n", baseDC, pixelformat, &pfd);
                        return false;
                }
 
@@ -1143,7 +1143,7 @@ qboolean VID_InitMode(viddef_mode_t *mode)
                if (!qwglMakeCurrent(baseDC, baseRC))
                {
                        VID_Shutdown();
-                       Con_Printf("wglMakeCurrent(%d, %d) failed\n", (int)baseDC, (int)baseRC);
+                       Con_Printf("wglMakeCurrent(%p, %p) failed\n", baseDC, baseRC);
                        return false;
                }
 
@@ -1223,7 +1223,7 @@ qboolean VID_InitMode(viddef_mode_t *mode)
        ClearAllStates ();
 
 // COMMANDLINEOPTION: Windows WGL: -novideosync disables WGL_EXT_swap_control
-       gl_videosyncavailable = GL_CheckExtension("WGL_EXT_swap_control", wglswapintervalfuncs, "-novideosync", false);
+       GL_CheckExtension("WGL_EXT_swap_control", wglswapintervalfuncs, "-novideosync", false);
 
        GL_Init ();
 
@@ -1238,7 +1238,7 @@ qboolean VID_InitMode(viddef_mode_t *mode)
        IN_StartupMouse ();
        IN_StartupJoystick ();
 
-       if (gl_videosyncavailable)
+       if (qwglSwapIntervalEXT)
        {
                vid_usevsync = vid_vsync.integer != 0;
                vid_usingvsync = vid_vsync.integer != 0;