fall back to 32 bpp - "Intel(R) 82810E Graphics Controller" won't accept a 16 bpp surface if the desktop is 32 bpp, so try 32 bpp as well.
This commit is contained in:
@@ -75,23 +75,33 @@ static LocalizedString SETVIDEOMODE_FAILED ( "RageDisplay", "SetVideoMode failed
|
||||
RString RageDisplay::SetVideoMode( VideoModeParams p, bool &bNeedReloadTextures )
|
||||
{
|
||||
RString err;
|
||||
err = this->TryVideoMode(p,bNeedReloadTextures);
|
||||
if( err == "" )
|
||||
vector<RString> vs;
|
||||
|
||||
if( err = this->TryVideoMode(p,bNeedReloadTextures) == "" )
|
||||
return RString();
|
||||
LOG->Trace( "TryVideoMode failed: %s", err.c_str() );
|
||||
vs.push_back( err );
|
||||
|
||||
// fall back
|
||||
if( this->TryVideoMode(p,bNeedReloadTextures) == "" )
|
||||
return RString();
|
||||
// fall back to settings that will most likely work
|
||||
p.bpp = 16;
|
||||
if( this->TryVideoMode(p,bNeedReloadTextures) == "" )
|
||||
if( err = this->TryVideoMode(p,bNeedReloadTextures) == "" )
|
||||
return RString();
|
||||
vs.push_back( err );
|
||||
|
||||
// "Intel(R) 82810E Graphics Controller" won't accept a 16 bpp surface if
|
||||
// the desktop is 32 bpp, so try 32 bpp as well.
|
||||
p.bpp = 32;
|
||||
if( err = this->TryVideoMode(p,bNeedReloadTextures) == "" )
|
||||
return RString();
|
||||
vs.push_back( err );
|
||||
|
||||
p.width = 640;
|
||||
p.height = 480;
|
||||
if( this->TryVideoMode(p,bNeedReloadTextures) == "" )
|
||||
if( err = this->TryVideoMode(p,bNeedReloadTextures) == "" )
|
||||
return RString();
|
||||
vs.push_back( err );
|
||||
|
||||
return SETVIDEOMODE_FAILED.GetValue() + " " + err;
|
||||
return SETVIDEOMODE_FAILED.GetValue() + " " + join(";",vs);
|
||||
}
|
||||
|
||||
void RageDisplay::ProcessStatsOnFlip()
|
||||
|
||||
Reference in New Issue
Block a user