]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - vid_shared.c
fix id1 demos to not show deathmatch overlay (they incorrectly contain
[xonotic/darkplaces.git] / vid_shared.c
index aaea23c0a45c746fb9bf15e1b9e3a3e8edcbb7b5..028b10dc3377e48f47d59f9b03b29ebe4ecab0ee 100644 (file)
@@ -14,6 +14,7 @@ qboolean in_client_mouse = true;
 
 // AK where should it be placed ?
 float in_mouse_x, in_mouse_y;
+float in_windowmouse_x, in_windowmouse_y;
 
 // value of GL_MAX_TEXTURE_<various>_SIZE
 int gl_max_texture_size = 0;
@@ -397,29 +398,27 @@ int GL_CheckExtension(const char *name, const dllfunction_t *funcs, const char *
                return false;
        }
 
-       if (strstr(gl_extensions, name) || strstr(gl_platformextensions, name) || (strncmp(name, "GL_", 3) && strncmp(name, "WGL_", 4) && strncmp(name, "GLX_", 4) && strncmp(name, "AGL_", 4)))
+       if ((name[2] == '_' || name[3] == '_') && !strstr(gl_extensions ? gl_extensions : "", name) && !strstr(gl_platformextensions ? gl_platformextensions : "", name))
        {
-               for (func = funcs;func && func->name != NULL;func++)
+               Con_DPrint("not detected\n");
+               return false;
+       }
+
+       for (func = funcs;func && func->name != NULL;func++)
+       {
+               // functions are cleared before all the extensions are evaluated
+               if (!(*func->funcvariable = (void *) GL_GetProcAddress(func->name)))
                {
-                       // functions are cleared before all the extensions are evaluated
-                       if (!(*func->funcvariable = (void *) GL_GetProcAddress(func->name)))
-                       {
-                               if (!silent)
-                                       Con_DPrintf("OpenGL extension \"%s\" is missing function \"%s\" - broken driver!\n", name, func->name);
-                               failed = true;
-                       }
+                       if (!silent)
+                               Con_DPrintf("OpenGL extension \"%s\" is missing function \"%s\" - broken driver!\n", name, func->name);
+                       failed = true;
                }
-               // delay the return so it prints all missing functions
-               if (failed)
-                       return false;
-               Con_DPrint("enabled\n");
-               return true;
        }
-       else
-       {
-               Con_DPrint("not detected\n");
+       // delay the return so it prints all missing functions
+       if (failed)
                return false;
-       }
+       Con_DPrint("enabled\n");
+       return true;
 }
 
 static dllfunction_t opengl110funcs[] =