From b11705de079ee4fbfe9fbef17535d9f35954059f Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Fri, 20 Jan 2006 00:16:26 +0000 Subject: [PATCH] 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.) --- stepmania/src/RageDisplay_D3D.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/stepmania/src/RageDisplay_D3D.cpp b/stepmania/src/RageDisplay_D3D.cpp index 0191594994..d0720d32d1 100644 --- a/stepmania/src/RageDisplay_D3D.cpp +++ b/stepmania/src/RageDisplay_D3D.cpp @@ -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; } }