don't throw fatal if CreateDevice or Reset fails so that the resolution fallback logic has a chance

This commit is contained in:
Chris Danford
2003-10-08 07:12:48 +00:00
parent b0e05dfbee
commit e63eb9bdfa
+4 -8
View File
@@ -508,10 +508,8 @@ CString RageDisplay_D3D::TryVideoMode( VideoModeParams p, bool &bNewDeviceOut )
&g_pd3dDevice );
if( FAILED(hr) )
{
#if defined _WINDOWS
SDL_QuitSubSystem(SDL_INIT_VIDEO); // exit out of full screen. The ~RageDisplay will not be called!
#endif
RageException::Throw( "CreateDevice failed: '%s'", GetErrorString(hr).c_str() );
// Likely D3D_ERR_INVALIDCALL. The driver probably doesn't support this video mode.
return ssprintf( "CreateDevice failed: '%s'", GetErrorString(hr).c_str() );
}
}
else
@@ -520,10 +518,8 @@ CString RageDisplay_D3D::TryVideoMode( VideoModeParams p, bool &bNewDeviceOut )
hr = g_pd3dDevice->Reset( &g_d3dpp );
if( FAILED(hr) )
{
#if defined _WINDOWS
SDL_QuitSubSystem(SDL_INIT_VIDEO); // exit out of full screen. The ~RageDisplay will not be called!
#endif
RageException::Throw( "g_pd3dDevice->Reset failed: '%s'", GetErrorString(hr).c_str() );
// Likely D3D_ERR_INVALIDCALL. The driver probably doesn't support this video mode.
return ssprintf("g_pd3dDevice->Reset failed: '%s'", GetErrorString(hr).c_str() );
}
}