mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-10 16:19:28 +01:00
Merge pull request #3464 from Armada651/stereo-warnings
VideoConfig: Don't give warnings for per-game stereoscopy parameters.
This commit is contained in:
commit
22555312de
@ -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);
|
||||
|
@ -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)
|
||||
@ -207,12 +202,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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user