1
0
Fork 0
forked from fte/fteqw

Be more verbose in the case of hardware errors, in case OMC has that issue again.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@6311 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2023-01-09 05:11:45 +00:00
parent 3be61ca1bc
commit cac4c91778

View file

@ -240,6 +240,7 @@ qboolean GLSCR_UpdateScreen (void)
//gl 4.5 / GL_ARB_robustness / GL_KHR_robustness
if (qglGetGraphicsResetStatus)
{
char *reason;
GLenum err = qglGetGraphicsResetStatus();
switch(err)
{
@ -249,7 +250,13 @@ qboolean GLSCR_UpdateScreen (void)
case GL_INNOCENT_CONTEXT_RESET: //something else broke the hardware and broke our ram
case GL_UNKNOWN_CONTEXT_RESET: //whodunit
default:
Con_Printf("OpenGL reset detected\n");
if (err == GL_GUILTY_CONTEXT_RESET)
reason = "guilty";
else if (err == GL_INNOCENT_CONTEXT_RESET)
reason = "innocent";
else
reason = "unknown";
Con_Printf("OpenGL reset detected (%s)\n", reason);
Sys_Sleep(3.0);
Cmd_ExecuteString("vid_restart", RESTRICT_LOCAL);
break;