SOMEWHAT cleaned up the VideoConfigDiag code:

Also verify the validity of gfx configuration directly after loading rather than in the GUI code (which was kinda stupid anyway).

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7164 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
NeoBrainX
2011-02-13 13:42:59 +00:00
parent a8992b7960
commit c30859dae0
4 changed files with 73 additions and 124 deletions

View File

@ -121,6 +121,9 @@ void VideoConfig::Load(const char *ini_file)
bool bTmp;
iniFile.Get("Interface", "UsePanicHandlers", &bTmp, true);
SetEnableAlert(bTmp);
VerifyValidity();
}
void VideoConfig::GameIniLoad(const char *ini_file)
@ -176,6 +179,19 @@ void VideoConfig::GameIniLoad(const char *ini_file)
iniFile.Get("Video", "ZTPSpeedupHack", &bZTPSpeedHack);
if (iniFile.Exists("Video", "DlistCachingEnable"))
iniFile.Get("Video", "DlistCachingEnable", &bDlistCachingEnable);
VerifyValidity();
}
void VideoConfig::VerifyValidity()
{
// TODO: Check iMaxAnisotropy value
if (!backend_info.bSupportsEFBToRAM) bCopyEFBToTexture = true;
if (iMultisampleMode >= (int)backend_info.AAModes.size()) iMultisampleMode = 0;
if (!backend_info.bSupportsRealXFB) bUseRealXFB = false;
if (!backend_info.bSupports3DVision) b3DVision = false;
if (!backend_info.bSupportsFormatReinterpretation) bEFBEmulateFormatChanges = false;
if (!backend_info.bSupportsPixelLighting) bEnablePixelLigting = false;
}
void VideoConfig::Save(const char *ini_file)