]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
added -gl_driver commandline option, it's useless though (crashs when I try it on...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 25 Sep 2002 02:38:01 +0000 (02:38 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 25 Sep 2002 02:38:01 +0000 (02:38 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2441 d7cf8633-e32d-0410-b094-e92efae38249

vid_wgl.c

index 1ecdb055d872d6acd0bed4225040fd4bf40f359f..571b5ad72d97d21f13d80ecd985d4e2991f18f8e 100644 (file)
--- a/vid_wgl.c
+++ b/vid_wgl.c
@@ -678,13 +678,18 @@ int VID_InitMode (int fullscreen, int width, int height, int bpp)
        DWORD WindowStyle, ExWindowStyle;
        HGLRC baseRC;
        int CenterX, CenterY;
+       const char *gldrivername;
 
        if (vid_initialized)
                Sys_Error("VID_InitMode called when video is already initialised\n");
 
-       if (!GL_OpenLibrary("opengl32.dll"))
+       gldrivername = "opengl32.dll";
+       i = COM_CheckParm("-gl_driver");
+       if (i && i < com_argc - 1)
+               gldrivername = com_argv[i + 1];
+       if (!GL_OpenLibrary(gldrivername))
        {
-               Con_Printf("Unable to load GL driver\n");
+               Con_Printf("Unable to load GL driver %s\n", gldrivername);
                return false;
        }