removed gl_videosyncavailable variable because on all known platforms it
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 7 Dec 2009 16:04:50 +0000 (16:04 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 7 Dec 2009 16:04:50 +0000 (16:04 +0000)
is always true, and its only purpose was to ghost a menu item

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9554 d7cf8633-e32d-0410-b094-e92efae38249

menu.c
vid.h
vid_agl.c
vid_glx.c
vid_sdl.c
vid_shared.c
vid_wgl.c

diff --git a/menu.c b/menu.c
index 9b17c58..ddea465 100644 (file)
--- a/menu.c
+++ b/menu.c
@@ -2918,7 +2918,7 @@ static void M_Video_Draw (void)
        t++;
 
        // Vertical Sync
-       M_ItemPrint(16, video_cursor_table[t], "         Vertical Sync", gl_videosyncavailable);
+       M_ItemPrint(16, video_cursor_table[t], "         Vertical Sync", true);
        M_DrawCheckbox(220, video_cursor_table[t], vid_vsync.integer);
        t++;
 
diff --git a/vid.h b/vid.h
index af70fa5..e824f15 100644 (file)
--- a/vid.h
+++ b/vid.h
@@ -119,9 +119,6 @@ extern char gl_driver[256];
 extern qboolean isG200;
 extern qboolean isRagePro;
 
-// LordHavoc: GLX_SGI_swap_control and WGL_EXT_swap_control
-extern int gl_videosyncavailable;
-
 void *GL_GetProcAddress(const char *name);
 int GL_CheckExtension(const char *minglver_or_ext, const dllfunction_t *funcs, const char *disableparm, int silent);
 
index af5c8b7..92341bc 100644 (file)
--- a/vid_agl.c
+++ b/vid_agl.c
@@ -701,7 +701,6 @@ qboolean VID_InitMode(viddef_mode_t *mode)
 
        gl_platformextensions = "";
        gl_platform = "AGL";
-       gl_videosyncavailable = true;
 
        multithreadedgl = false;
        vid_isfullscreen = mode->fullscreen;
index 4fbb2d8..9202cff 100644 (file)
--- a/vid_glx.c
+++ b/vid_glx.c
@@ -689,8 +689,8 @@ void InitSig(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 && qglXSwapIntervalSGI;
+       if (vid_usingvsync != vid_usevsync)
        {
                vid_usingvsync = vid_usevsync;
                if (qglXSwapIntervalSGI (vid_usevsync))
@@ -1029,7 +1029,7 @@ qboolean VID_InitMode(viddef_mode_t *mode)
 // COMMANDLINEOPTION: Linux GLX: -novideosync disables GLX_SGI_swap_control
 // COMMANDLINEOPTION: BSD GLX: -novideosync disables GLX_SGI_swap_control
 // COMMANDLINEOPTION: MacOSX GLX: -novideosync disables GLX_SGI_swap_control
-       gl_videosyncavailable = GL_CheckExtension("GLX_SGI_swap_control", swapcontrolfuncs, "-novideosync", false);
+       GL_CheckExtension("GLX_SGI_swap_control", swapcontrolfuncs, "-novideosync", false);
 
        vid_usingmousegrab = false;
        vid_usingmouse = false;
index c368bbc..7a3076a 100644 (file)
--- a/vid_sdl.c
+++ b/vid_sdl.c
@@ -761,7 +761,6 @@ qboolean VID_InitMode(viddef_mode_t *mode)
 
        gl_platform = "SDL";
        gl_platformextensions = "";
-       gl_videosyncavailable = true;
 
        GL_Init();
 
index dcaf8a8..8966307 100644 (file)
@@ -27,8 +27,6 @@ int gl_textureunits = 1;
 int gl_combine_extension = false;
 // GL_EXT_compiled_vertex_array
 int gl_supportslockarrays = false;
-// GLX_SGI_swap_control or WGL_EXT_swap_control
-int gl_videosyncavailable = false;
 // 3D textures available
 int gl_texture3d = false;
 // GL_ARB_texture_cubemap
index 1b6a27a..0eebe7d 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);
@@ -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;