make SetVideoMode not throw

This commit is contained in:
Glenn Maynard
2004-11-30 20:01:07 +00:00
parent 388fb41404
commit 6f46898f69
6 changed files with 30 additions and 19 deletions
+10 -2
View File
@@ -268,7 +268,10 @@ RageDisplay_D3D::RageDisplay_D3D( VideoModeParams p )
* actually initialize the window. Do this after as many error conditions
* as possible, because if we have to shut it down again we'll flash a window
* briefly. */
SetVideoMode( p );
bool bIgnore = false;
CString sError = SetVideoMode( p, bIgnore );
if( sError != "" )
RageException::ThrowNonfatal( sError );
} catch(...) {
// Clean up; ~RageDisplay will not be called.
if( g_pd3d )
@@ -629,9 +632,14 @@ bool RageDisplay_D3D::BeginFrame()
case D3DERR_DEVICELOST:
return false;
case D3DERR_DEVICENOTRESET:
SetVideoMode( GraphicsWindow::GetParams() );
{
bool bIgnore = false;
CString sError = SetVideoMode( GraphicsWindow::GetParams(), bIgnore );
if( sError != "" )
RageException::Throw( sError );
break;
}
}
#endif
g_pd3dDevice->Clear( 0, NULL, D3DCLEAR_TARGET|D3DCLEAR_ZBUFFER,