From d6b08a7881a1cbe01cea5bbad0e2201abf36b638 Mon Sep 17 00:00:00 2001 From: havoc Date: Wed, 25 Sep 2002 02:38:01 +0000 Subject: [PATCH] added -gl_driver commandline option, it's useless though (crashs when I try it on my voodoo2) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2441 d7cf8633-e32d-0410-b094-e92efae38249 --- vid_wgl.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/vid_wgl.c b/vid_wgl.c index 1ecdb055..571b5ad7 100644 --- 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; } -- 2.39.2