mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-26 06:20:48 +00:00
Fall back to opengl32.dll if the gldriver couldn't be loaded
This commit is contained in:
parent
5523cc8de2
commit
27de5f3a6f
1 changed files with 6 additions and 6 deletions
|
@ -3683,13 +3683,13 @@ QGL_Init(const char *dllname)
|
|||
{
|
||||
if ((glw_state.hinstOpenGL = LoadLibrary(dllname)) == 0)
|
||||
{
|
||||
char *buf = NULL;
|
||||
ri.Con_Printf(PRINT_ALL, "Couldn't load %s, trying hardcoded default opengl32.dll\n", dllname);
|
||||
|
||||
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
|
||||
NULL, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
|
||||
(LPTSTR)&buf, 0, NULL);
|
||||
ri.Con_Printf(PRINT_ALL, "%s\n", buf);
|
||||
return false;
|
||||
if ((glw_state.hinstOpenGL = LoadLibrary("opengl32.dll")) == 0)
|
||||
{
|
||||
ri.Con_Printf(PRINT_ALL, "Couldn't load opengl32.dll\n");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
gl_config.allow_cds = true;
|
||||
|
|
Loading…
Reference in a new issue