From dd079dd3116662957ecce7bd3ec5e7280adbc351 Mon Sep 17 00:00:00 2001 From: tomaz Date: Sun, 26 Sep 2004 11:25:11 +0000 Subject: [PATCH] Fixed some errors in the vid_vsync code. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4538 d7cf8633-e32d-0410-b094-e92efae38249 --- menu.c | 2 +- vid_glx.c | 2 ++ vid_shared.c | 1 - vid_wgl.c | 5 ++++- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/menu.c b/menu.c index 474f7edf..de19816c 100644 --- 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 diff --git a/vid_glx.c b/vid_glx.c index 7e670a13..c08247c0 100644 --- 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); diff --git a/vid_shared.c b/vid_shared.c index 93262be9..527da363 100644 --- a/vid_shared.c +++ b/vid_shared.c @@ -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; diff --git a/vid_wgl.c b/vid_wgl.c index 99235ff2..d9552675 100644 --- 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); -- 2.39.2