fix to failed renderer restart logic

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2171 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
TimeServ 2006-04-06 22:07:34 +00:00
parent bcb4f10991
commit 3d0489e736

View file

@ -1930,11 +1930,19 @@ TRACE(("dbg: R_RestartRenderer_f\n"));
Con_Printf(S_ERROR "Video mode switch failed. Old mode restored.\n"); //go back to the old mode, the new one failed.
}
else
{
qboolean failed = true;
if (newr.rate != 0)
{
Con_Printf(S_NOTICE "Trying default refresh rate\n");
newr.rate = 0;
if (!R_ApplyRenderer(&oldr))
failed = !R_ApplyRenderer(&newr);
}
if (failed)
{
newr.renderer = QR_NONE;
if (R_ApplyRenderer(&newr))
{
TRACE(("dbg: R_RestartRenderer_f going to dedicated\n"));