don't throw fatal if CreateDevice or Reset fails so that the resolution fallback logic has a chance
This commit is contained in:
@@ -508,10 +508,8 @@ CString RageDisplay_D3D::TryVideoMode( VideoModeParams p, bool &bNewDeviceOut )
|
|||||||
&g_pd3dDevice );
|
&g_pd3dDevice );
|
||||||
if( FAILED(hr) )
|
if( FAILED(hr) )
|
||||||
{
|
{
|
||||||
#if defined _WINDOWS
|
// Likely D3D_ERR_INVALIDCALL. The driver probably doesn't support this video mode.
|
||||||
SDL_QuitSubSystem(SDL_INIT_VIDEO); // exit out of full screen. The ~RageDisplay will not be called!
|
return ssprintf( "CreateDevice failed: '%s'", GetErrorString(hr).c_str() );
|
||||||
#endif
|
|
||||||
RageException::Throw( "CreateDevice failed: '%s'", GetErrorString(hr).c_str() );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -520,10 +518,8 @@ CString RageDisplay_D3D::TryVideoMode( VideoModeParams p, bool &bNewDeviceOut )
|
|||||||
hr = g_pd3dDevice->Reset( &g_d3dpp );
|
hr = g_pd3dDevice->Reset( &g_d3dpp );
|
||||||
if( FAILED(hr) )
|
if( FAILED(hr) )
|
||||||
{
|
{
|
||||||
#if defined _WINDOWS
|
// Likely D3D_ERR_INVALIDCALL. The driver probably doesn't support this video mode.
|
||||||
SDL_QuitSubSystem(SDL_INIT_VIDEO); // exit out of full screen. The ~RageDisplay will not be called!
|
return ssprintf("g_pd3dDevice->Reset failed: '%s'", GetErrorString(hr).c_str() );
|
||||||
#endif
|
|
||||||
RageException::Throw( "g_pd3dDevice->Reset failed: '%s'", GetErrorString(hr).c_str() );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user