Don't crash when trying to use d3d.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1960 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2006-02-12 17:06:55 +00:00
parent f2c0995cfc
commit 01c3544aeb

View file

@ -263,9 +263,6 @@ qboolean GLInitialise (char *renderer)
qGetDeviceGammaRamp = (void *)getglfunc("wglGetDeviceGammaRamp3DFX"); qGetDeviceGammaRamp = (void *)getglfunc("wglGetDeviceGammaRamp3DFX");
qSetDeviceGammaRamp = (void *)getglfunc("wglSetDeviceGammaRamp3DFX"); qSetDeviceGammaRamp = (void *)getglfunc("wglSetDeviceGammaRamp3DFX");
if (!qGetDeviceGammaRamp) qGetDeviceGammaRamp = (void*)GetDeviceGammaRamp;
if (!qSetDeviceGammaRamp) qSetDeviceGammaRamp = (void*)SetDeviceGammaRamp;
TRACE(("dbg: GLInitialise: got wgl funcs\n")); TRACE(("dbg: GLInitialise: got wgl funcs\n"));
return true; return true;
@ -818,6 +815,9 @@ qboolean VID_AttachGL (rendererstate_t *info)
qglClear(GL_COLOR_BUFFER_BIT); qglClear(GL_COLOR_BUFFER_BIT);
qSwapBuffers(maindc); qSwapBuffers(maindc);
if (!qGetDeviceGammaRamp) qGetDeviceGammaRamp = (void*)GetDeviceGammaRamp;
if (!qSetDeviceGammaRamp) qSetDeviceGammaRamp = (void*)SetDeviceGammaRamp;
return true; return true;
} }