]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - vid_sdl.c
made darkplaces compile successfully with g++ to test for errors C doesn't care about...
[xonotic/darkplaces.git] / vid_sdl.c
index 940f57df7c0f662fc25ae79f7584940c6d31aa88..50513fe6e24bddb6881005882cd0adfe3740b0f5 100644 (file)
--- a/vid_sdl.c
+++ b/vid_sdl.c
@@ -374,17 +374,15 @@ int VID_InitMode(int fullscreen, int width, int height, int bpp)
                return false;
        }
 
-       qglGetString = GL_GetProcAddress("glGetString");
-
-       // Knghtbrd: should do platform-specific extension string function here
-
-       if (qglGetString == NULL)
+       if ((qglGetString = (const GLubyte* (GLAPIENTRY *)(GLenum name))GL_GetProcAddress("glGetString")) == NULL)
        {
                VID_Shutdown();
                Con_Print("Required OpenGL function glGetString not found\n");
                return false;
        }
 
+       // Knghtbrd: should do platform-specific extension string function here
+
        vid_isfullscreen = false;
        if (fullscreen) {
                flags |= SDL_FULLSCREEN;