]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
Fixed some errors in the vid_vsync code.
authortomaz <tomaz@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 26 Sep 2004 11:25:11 +0000 (11:25 +0000)
committertomaz <tomaz@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 26 Sep 2004 11:25:11 +0000 (11:25 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4538 d7cf8633-e32d-0410-b094-e92efae38249

menu.c
vid_glx.c
vid_shared.c
vid_wgl.c

diff --git a/menu.c b/menu.c
index 474f7edf5aa81a0745a8149d0955d433d9195865..de19816cbd2256cb36d5c05298680912357837f4 100644 (file)
--- a/menu.c
+++ b/menu.c
@@ -2480,7 +2480,7 @@ void M_Video_Draw (void)
        M_Print(220, video_cursor_table[3], "Apply");
 
        // Vertical Sync
-       M_Print(16, video_cursor_table[4], "         Vertical Sync");
+       M_ItemPrint (0, video_cursor_table[4], "         Vertical Sync", gl_videosyncavailable);
        M_DrawCheckbox(220, video_cursor_table[4], vid_vsync.integer);
 
        // Cursor
index 7e670a13c3d2068c8529a0043c415784dc505e45..c08247c0a5c3975c7560cb6eef5d7731955c4546 100644 (file)
--- a/vid_glx.c
+++ b/vid_glx.c
@@ -844,6 +844,8 @@ int VID_InitMode(int fullscreen, int width, int height, int bpp)
        gl_platform = "GLX";
        gl_platformextensions = qglXQueryExtensionsString(vidx11_display, vidx11_screen);
 
+       gl_videosyncavailable = false;
+
        GL_CheckExtension("GLX_ARB_get_proc_address", getprocaddressfuncs, "-nogetprocaddress", false);
        gl_videosyncavailable = GL_CheckExtension("GLX_SGI_video_sync", videosyncfuncs, "-novideosync", false);
 
index 93262be97bfbedb3fa4777dc9e270164215c58d3..527da3632f45d5ab43f23f1e767ee3fcb82f3c19 100644 (file)
@@ -628,7 +628,6 @@ void VID_CheckExtensions(void)
        gl_textureunits = 1;
        gl_combine_extension = false;
        gl_supportslockarrays = false;
-       gl_videosyncavailable = false;
        gl_texture3d = false;
        gl_texturecubemap = false;
        gl_dot3arb = false;
index 99235ff2a63aa44fe5ff60e50d9e68f942778113..d95526757ee2e0a18d300dd03271ef0aa14b8b8f 100644 (file)
--- a/vid_wgl.c
+++ b/vid_wgl.c
@@ -311,7 +311,8 @@ void VID_Finish (void)
        {
                old_vsync = bound(0, vid_vsync.integer, 1);
                Cvar_SetValueQuick(&vid_vsync, old_vsync);
-               qwglSwapIntervalEXT (old_vsync);
+               if (gl_videosyncavailable)
+                       qwglSwapIntervalEXT (old_vsync);
        }
 
        if (r_render.integer && !scr_skipupdate)
@@ -985,6 +986,8 @@ int VID_InitMode (int fullscreen, int width, int height, int bpp)
        gl_platform = "WGL";
        gl_platformextensions = "";
 
+       gl_videosyncavailable = false;
+
        if (qwglGetExtensionsStringARB)
                gl_platformextensions = qwglGetExtensionsStringARB(hdc);