From 855c63956ad35d4191cd28ad98762eed731e8fb7 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Mon, 4 Jun 2012 10:37:31 +0200 Subject: [PATCH] this one is obvious: get rid of -gl_driver option in a -DANTICHEAT compile --- vid_glx.c | 3 +++ vid_sdl.c | 3 +++ vid_wgl.c | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/vid_glx.c b/vid_glx.c index 5b77483f..b14bd137 100644 --- a/vid_glx.c +++ b/vid_glx.c @@ -1335,12 +1335,15 @@ static qboolean VID_InitModeGL(viddef_mode_t *mode) #else drivername = "libGL.so.1"; #endif + +#ifndef ANTICHEAT // COMMANDLINEOPTION: Linux GLX: -gl_driver selects a GL driver library, default is libGL.so.1, useful only for using fxmesa or similar, if you don't know what this is for, you don't need it // COMMANDLINEOPTION: BSD GLX: -gl_driver selects a GL driver library, default is libGL.so.1, useful only for using fxmesa or similar, if you don't know what this is for, you don't need it // LordHavoc: although this works on MacOSX, it's useless there (as there is only one system libGL) i = COM_CheckParm("-gl_driver"); if (i && i < com_argc - 1) drivername = com_argv[i + 1]; +#endif if (!GL_OpenLibrary(drivername)) { Con_Printf("Unable to load GL driver \"%s\"\n", drivername); diff --git a/vid_sdl.c b/vid_sdl.c index 9484f6c2..2c58f9d6 100644 --- a/vid_sdl.c +++ b/vid_sdl.c @@ -2049,10 +2049,13 @@ static qboolean VID_InitModeGL(viddef_mode_t *mode) // SDL usually knows best drivername = NULL; +#ifndef ANTICHEAT // COMMANDLINEOPTION: SDL GL: -gl_driver selects a GL driver library, default is whatever SDL recommends, useful only for 3dfxogl.dll/3dfxvgl.dll or fxmesa or similar, if you don't know what this is for, you don't need it i = COM_CheckParm("-gl_driver"); if (i && i < com_argc - 1) drivername = com_argv[i + 1]; +#endif + if (SDL_GL_LoadLibrary(drivername) < 0) { Con_Printf("Unable to load GL driver \"%s\": %s\n", drivername, SDL_GetError()); diff --git a/vid_wgl.c b/vid_wgl.c index cb74dea9..2d75f1ff 100644 --- a/vid_wgl.c +++ b/vid_wgl.c @@ -993,10 +993,14 @@ qboolean VID_InitModeGL(viddef_mode_t *mode) *af = 0; gldrivername = "opengl32.dll"; + +#ifndef ANTICHEAT // COMMANDLINEOPTION: Windows WGL: -gl_driver selects a GL driver library, default is opengl32.dll, useful only for 3dfxogl.dll or 3dfxvgl.dll, if you don't know what this is for, you don't need it i = COM_CheckParm("-gl_driver"); if (i && i < com_argc - 1) gldrivername = com_argv[i + 1]; +#endif + if (!GL_OpenLibrary(gldrivername)) { Con_Printf("Unable to load GL driver %s\n", gldrivername); -- 2.39.2