When we get D3DERR_DEVICENOTRESET, we should go back to the mode

we were in when we lost the device, not do a complete mode search
from scratch.  This fixes a dependency on the behavior of storing
the last successful mode change back into PREFSMAN.  (This is
D3D's equivalent to the WM_ACTIVATE -> ChangeDisplaySettings code
in GraphicsWindow.)
This commit is contained in:
Glenn Maynard
2006-01-20 00:16:26 +00:00
parent 626427c00c
commit b11705de07
+3 -4
View File
@@ -641,12 +641,11 @@ bool RageDisplay_D3D::BeginFrame()
case D3DERR_DEVICENOTRESET:
{
bool bIgnore = false;
VideoModeParams params;
StepMania::GetPreferredVideoModeParams( params );
CString sError = SetVideoMode( params, bIgnore );
CString sError = SetD3DParams( bIgnore );
if( sError != "" )
RageException::Throw( sError );
this->SetDefaultRenderStates();
break;
}
}