diff options
| author | degasus <wickmarkus@web.de> | 2015-12-12 13:00:08 +0100 |
|---|---|---|
| committer | degasus <wickmarkus@web.de> | 2015-12-15 09:41:01 +0100 |
| commit | e26d9f7c35b0a84e6ae7181e0a6b9bf7568dea7b (patch) | |
| tree | 875c435ff8a25fc6804a2ee697eb84f2946224d8 /Source/Core/VideoCommon/VideoConfig.cpp | |
| parent | cc3dc05438b9324075c873cc42e72fd465b04990 (diff) | |
MSAA: Store samples in ini files.
Diffstat (limited to 'Source/Core/VideoCommon/VideoConfig.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/VideoConfig.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/Source/Core/VideoCommon/VideoConfig.cpp b/Source/Core/VideoCommon/VideoConfig.cpp index 874e8f2ddb..280b3d9f74 100644 --- a/Source/Core/VideoCommon/VideoConfig.cpp +++ b/Source/Core/VideoCommon/VideoConfig.cpp @@ -2,6 +2,7 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. +#include <algorithm> #include <cmath> #include "Common/CommonTypes.h" @@ -76,7 +77,7 @@ void VideoConfig::Load(const std::string& ini_file) settings->Get("UseFFV1", &bUseFFV1, 0); settings->Get("EnablePixelLighting", &bEnablePixelLighting, 0); settings->Get("FastDepthCalc", &bFastDepthCalc, true); - settings->Get("MSAA", &iMultisampleMode, 0); + settings->Get("MSAA", &iMultisamples, 1); settings->Get("SSAA", &bSSAA, false); settings->Get("EFBScale", &iEFBScale, (int)SCALE_1X); // native settings->Get("TexFmtOverlayEnable", &bTexFmtOverlayEnable, 0); @@ -169,7 +170,7 @@ void VideoConfig::GameIniLoad() CHECK_SETTING("Video_Settings", "CacheHiresTextures", bCacheHiresTextures); CHECK_SETTING("Video_Settings", "EnablePixelLighting", bEnablePixelLighting); CHECK_SETTING("Video_Settings", "FastDepthCalc", bFastDepthCalc); - CHECK_SETTING("Video_Settings", "MSAA", iMultisampleMode); + CHECK_SETTING("Video_Settings", "MSAA", iMultisamples); CHECK_SETTING("Video_Settings", "SSAA", bSSAA); int tmp = -9000; @@ -245,8 +246,11 @@ void VideoConfig::GameIniLoad() void VideoConfig::VerifyValidity() { // TODO: Check iMaxAnisotropy value - if (iAdapter < 0 || iAdapter > ((int)backend_info.Adapters.size() - 1)) iAdapter = 0; - if (iMultisampleMode < 0 || iMultisampleMode >= (int)backend_info.AAModes.size()) iMultisampleMode = 0; + if (iAdapter < 0 || iAdapter > ((int)backend_info.Adapters.size() - 1)) + iAdapter = 0; + + if (std::find(backend_info.AAModes.begin(), backend_info.AAModes.end(), iMultisamples) == backend_info.AAModes.end()) + iMultisamples = 1; if (iStereoMode > 0) { @@ -293,7 +297,7 @@ void VideoConfig::Save(const std::string& ini_file) settings->Set("UseFFV1", bUseFFV1); settings->Set("EnablePixelLighting", bEnablePixelLighting); settings->Set("FastDepthCalc", bFastDepthCalc); - settings->Set("MSAA", iMultisampleMode); + settings->Set("MSAA", iMultisamples); settings->Set("SSAA", bSSAA); settings->Set("EFBScale", iEFBScale); settings->Set("TexFmtOverlayEnable", bTexFmtOverlayEnable); |
