mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
MSAA: Store samples in ini files.
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user