diff options
| author | Scott Mansell <phiren@gmail.com> | 2015-12-19 01:37:10 +1300 |
|---|---|---|
| committer | Scott Mansell <phiren@gmail.com> | 2015-12-19 01:37:10 +1300 |
| commit | ebe3c49c5f65d4da1762bb51071044c94fd92c18 (patch) | |
| tree | 9bab8b73ae9a18a7a405d692b2c92ca2c38522fb /Source/Core/VideoCommon/VideoConfig.cpp | |
| parent | 7a78df2624f09c61c111a91c698ca122efd4967d (diff) | |
| parent | e26d9f7c35b0a84e6ae7181e0a6b9bf7568dea7b (diff) | |
Merge pull request #3332 from degasus/master
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 8c682af39c..a9181e7b21 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; @@ -244,8 +245,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) { @@ -292,7 +296,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); |
