summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/Src/VideoConfig.cpp
diff options
context:
space:
mode:
authorNeoBrainX <NeoBrainX@googlemail.com>2011-02-13 13:42:59 +0000
committerNeoBrainX <NeoBrainX@googlemail.com>2011-02-13 13:42:59 +0000
commitc30859dae04ac7bec4548bb4be61ce36054486f8 (patch)
tree95d83dc791db2bd207310205160502a78060f1c2 /Source/Core/VideoCommon/Src/VideoConfig.cpp
parenta8992b7960dd18a1e4d5d1b8cbc44145ae874a30 (diff)
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
Diffstat (limited to 'Source/Core/VideoCommon/Src/VideoConfig.cpp')
-rw-r--r--Source/Core/VideoCommon/Src/VideoConfig.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/Source/Core/VideoCommon/Src/VideoConfig.cpp b/Source/Core/VideoCommon/Src/VideoConfig.cpp
index 11fa943e23..ec65155328 100644
--- a/Source/Core/VideoCommon/Src/VideoConfig.cpp
+++ b/Source/Core/VideoCommon/Src/VideoConfig.cpp
@@ -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)