mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -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 <map>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
@ -772,11 +773,11 @@ void VideoConfigDiag::PopulateAAList()
|
||||
}
|
||||
}
|
||||
|
||||
int selected_mode_index = vconfig.iMultisampleMode;
|
||||
int selected_mode_index = 0;
|
||||
|
||||
// Don't go out of range
|
||||
if (selected_mode_index >= aa_modes.size())
|
||||
return;
|
||||
auto index = std::find(aa_modes.begin(), aa_modes.end(), vconfig.iMultisamples);
|
||||
if (index != aa_modes.end())
|
||||
selected_mode_index = index - aa_modes.begin();
|
||||
|
||||
// Select one of the SSAA modes at the end of the list if SSAA is enabled
|
||||
if (supports_ssaa && vconfig.bSSAA && aa_modes[selected_mode_index] != 1)
|
||||
@ -787,11 +788,14 @@ void VideoConfigDiag::PopulateAAList()
|
||||
|
||||
void VideoConfigDiag::OnAAChanged(wxCommandEvent& ev)
|
||||
{
|
||||
int mode = ev.GetInt();
|
||||
size_t mode = ev.GetInt();
|
||||
ev.Skip();
|
||||
|
||||
vconfig.bSSAA = mode > m_msaa_modes;
|
||||
mode -= vconfig.bSSAA * m_msaa_modes;
|
||||
|
||||
vconfig.iMultisampleMode = mode;
|
||||
if (mode >= vconfig.backend_info.AAModes.size())
|
||||
return;
|
||||
|
||||
vconfig.iMultisamples = vconfig.backend_info.AAModes[mode];
|
||||
}
|
||||
|
Reference in New Issue
Block a user