From e63eb9bdfa7949dde7c02763d0dd66af4f4615dc Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Wed, 8 Oct 2003 07:12:48 +0000 Subject: [PATCH] don't throw fatal if CreateDevice or Reset fails so that the resolution fallback logic has a chance --- stepmania/src/RageDisplay_D3D.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/stepmania/src/RageDisplay_D3D.cpp b/stepmania/src/RageDisplay_D3D.cpp index 984c2f3d1b..a0cc1e8849 100644 --- a/stepmania/src/RageDisplay_D3D.cpp +++ b/stepmania/src/RageDisplay_D3D.cpp @@ -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() ); } }