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 RageDisplay::SetVideoMode( VideoModeParams p, bool &bNeedReloadTextures )
|
||||||
{
|
{
|
||||||
RString err;
|
RString err;
|
||||||
err = this->TryVideoMode(p,bNeedReloadTextures);
|
vector<RString> vs;
|
||||||
if( err == "" )
|
|
||||||
|
if( err = this->TryVideoMode(p,bNeedReloadTextures) == "" )
|
||||||
return RString();
|
return RString();
|
||||||
LOG->Trace( "TryVideoMode failed: %s", err.c_str() );
|
LOG->Trace( "TryVideoMode failed: %s", err.c_str() );
|
||||||
|
vs.push_back( err );
|
||||||
|
|
||||||
// fall back
|
// fall back to settings that will most likely work
|
||||||
if( this->TryVideoMode(p,bNeedReloadTextures) == "" )
|
|
||||||
return RString();
|
|
||||||
p.bpp = 16;
|
p.bpp = 16;
|
||||||
if( this->TryVideoMode(p,bNeedReloadTextures) == "" )
|
if( err = this->TryVideoMode(p,bNeedReloadTextures) == "" )
|
||||||
return RString();
|
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.width = 640;
|
||||||
p.height = 480;
|
p.height = 480;
|
||||||
if( this->TryVideoMode(p,bNeedReloadTextures) == "" )
|
if( err = this->TryVideoMode(p,bNeedReloadTextures) == "" )
|
||||||
return RString();
|
return RString();
|
||||||
|
vs.push_back( err );
|
||||||
|
|
||||||
return SETVIDEOMODE_FAILED.GetValue() + " " + err;
|
return SETVIDEOMODE_FAILED.GetValue() + " " + join(";",vs);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RageDisplay::ProcessStatsOnFlip()
|
void RageDisplay::ProcessStatsOnFlip()
|
||||||
|
|||||||
Reference in New Issue
Block a user