VideoConfig: Don't give warnings for per-game stereoscopy parameters.

This commit is contained in:
Jules Blok 2015-12-24 15:48:02 +01:00
parent 7fcb5a803b
commit 1e111421e9
2 changed files with 14 additions and 9 deletions

View File

@ -111,7 +111,7 @@ public:
// Returns true if key exists in section
bool Exists(const std::string& sectionName, const std::string& key) const;
template<typename T> bool GetIfExists(const std::string& sectionName, const std::string& key, T value)
template<typename T> bool GetIfExists(const std::string& sectionName, const std::string& key, T* value)
{
if (Exists(sectionName, key))
return GetOrCreateSection(sectionName)->Get(key, value);
@ -119,6 +119,14 @@ public:
return false;
}
template<typename T> bool GetIfExists(const std::string& sectionName, const std::string& key, T* value, T defaultValue)
{
if (Exists(sectionName, key))
return GetOrCreateSection(sectionName)->Get(key, value, defaultValue);
return false;
}
bool GetKeys(const std::string& sectionName, std::vector<std::string>* keys) const;
void SetLines(const std::string& sectionName, const std::vector<std::string>& lines);

View File

@ -41,11 +41,6 @@ VideoConfig::VideoConfig()
// disable all features by default
backend_info.APIType = API_NONE;
backend_info.bSupportsExclusiveFullscreen = false;
// Game-specific stereoscopy settings
bStereoEFBMonoDepth = false;
iStereoDepthPercentage = 100;
iStereoConvergence = 20;
}
void VideoConfig::Load(const std::string& ini_file)
@ -198,12 +193,14 @@ void VideoConfig::GameIniLoad()
CHECK_SETTING("Video_Enhancements", "MaxAnisotropy", iMaxAnisotropy); // NOTE - this is x in (1 << x)
CHECK_SETTING("Video_Enhancements", "PostProcessingShader", sPostProcessingShader);
// These are not overrides, they are per-game stereoscopy parameters, hence no warning
iniFile.GetIfExists("Video_Stereoscopy", "StereoConvergence", &iStereoConvergence, 20);
iniFile.GetIfExists("Video_Stereoscopy", "StereoEFBMonoDepth", &bStereoEFBMonoDepth, false);
iniFile.GetIfExists("Video_Stereoscopy", "StereoDepthPercentage", &iStereoDepthPercentage, 100);
CHECK_SETTING("Video_Stereoscopy", "StereoMode", iStereoMode);
CHECK_SETTING("Video_Stereoscopy", "StereoDepth", iStereoDepth);
CHECK_SETTING("Video_Stereoscopy", "StereoConvergence", iStereoConvergence);
CHECK_SETTING("Video_Stereoscopy", "StereoSwapEyes", bStereoSwapEyes);
CHECK_SETTING("Video_Stereoscopy", "StereoEFBMonoDepth", bStereoEFBMonoDepth);
CHECK_SETTING("Video_Stereoscopy", "StereoDepthPercentage", iStereoDepthPercentage);
CHECK_SETTING("Video_Hacks", "EFBAccessEnable", bEFBAccessEnable);
CHECK_SETTING("Video_Hacks", "BBoxEnable", bBBoxEnable);