mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
MSAA: Store samples in ini files.
This commit is contained in:
@ -2,6 +2,8 @@
|
||||
// Licensed under GPLv2+
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "Common/StringUtil.h"
|
||||
#include "VideoBackends/D3D/D3DBase.h"
|
||||
#include "VideoBackends/D3D/D3DState.h"
|
||||
@ -199,11 +201,6 @@ D3D_FEATURE_LEVEL GetFeatureLevel(IDXGIAdapter* adapter)
|
||||
return feat_level;
|
||||
}
|
||||
|
||||
DXGI_SAMPLE_DESC GetAAMode(int index)
|
||||
{
|
||||
return aa_modes[index];
|
||||
}
|
||||
|
||||
HRESULT Create(HWND wnd)
|
||||
{
|
||||
hWnd = wnd;
|
||||
@ -258,9 +255,14 @@ HRESULT Create(HWND wnd)
|
||||
|
||||
// get supported AA modes
|
||||
aa_modes = EnumAAModes(adapter);
|
||||
if (g_Config.iMultisampleMode >= (int)aa_modes.size())
|
||||
|
||||
if (std::find_if(
|
||||
aa_modes.begin(),
|
||||
aa_modes.end(),
|
||||
[](const DXGI_SAMPLE_DESC& desc) {return desc.Count == g_Config.iMultisamples;}
|
||||
) == aa_modes.end())
|
||||
{
|
||||
g_Config.iMultisampleMode = 0;
|
||||
g_Config.iMultisamples = 1;
|
||||
UpdateActiveConfig();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user