Exit game if loading renderer fails

it's no fun without a  window, even if sound works you don't have input..
This commit is contained in:
Daniel Gibson 2017-09-03 22:57:58 +02:00
parent aa5f63e0dc
commit 36ef1e6bb8

View file

@ -177,11 +177,18 @@ VID_CheckChanges(void)
cls.disable_screen = true; cls.disable_screen = true;
// Proceed to reboot the refresher // Proceed to reboot the refresher
if(!VID_LoadRefresh() && (strcmp(vid_renderer->string, "gl1") != 0)) if(!VID_LoadRefresh())
{ {
Com_Printf("\n ... trying again with standard OpenGL1.x renderer ... \n\n"); if (strcmp(vid_renderer->string, "gl1") != 0)
Cvar_Set("vid_renderer", "gl1"); {
VID_LoadRefresh(); Com_Printf("\n ... trying again with standard OpenGL1.x renderer ... \n\n");
Cvar_Set("vid_renderer", "gl1");
VID_LoadRefresh();
}
else
{
Com_Error(ERR_FATAL, "Couldn't load a rendering backend!\n");
}
} }
cls.disable_screen = false; cls.disable_screen = false;
} }