Skip to content
Snippets Groups Projects
Commit eaec5126 authored by James R.'s avatar James R.
Browse files

Merge branch 'ogl-driver-error' into 'next'

Add error message when the GDI Generic OpenGL renderer is encountered in Windows

See merge request STJr/SRB2!1172
parents ed0336a9 e234eb8f
No related branches found
No related tags found
No related merge requests found
......@@ -167,6 +167,18 @@ boolean OglSdlSurface(INT32 w, INT32 h)
GL_DBG_Printf("OpenGL %s\n", gl_version);
GL_DBG_Printf("GPU: %s\n", gl_renderer);
GL_DBG_Printf("Extensions: %s\n", gl_extensions);
if (strcmp((const char*)gl_renderer, "GDI Generic") == 0 &&
strcmp((const char*)gl_version, "1.1.0") == 0)
{
// Oh no... Windows gave us the GDI Generic rasterizer, so something is wrong...
// The game will crash later on when unsupported OpenGL commands are encountered.
// Instead of a nondescript crash, show a more informative error message.
// Also set the renderer variable back to software so the next launch won't
// repeat this error.
CV_StealthSet(&cv_renderer, "Software");
I_Error("OpenGL Error: Failed to access the GPU. There may be an issue with your graphics drivers.");
}
}
first_init = true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment