mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-11 05:26:24 +02:00
Postshader: Don't save default setting values.
This way the defaults can change in the future without problems.
This commit is contained in:
1 parent
ff4971ff62
commit
f202029d0b
4 files changed
+24
-12
No files matched your search
@@ -418,7 +418,12 @@ void DisplayLayoutScreen::CreateViews() {
|
||||
auto &setting = shaderInfo->settings[i];
|
||||
if (!setting.name.empty()) {
|
||||
// This map lookup will create the setting in the mPostShaderSetting map if it doesn't exist, with a default value of 0.0.
|
||||
auto &value = g_Config.mPostShaderSetting[StringFromFormat("%sSettingValue%d", shaderInfo->section.c_str(), i + 1)];
|
||||
std::string key = StringFromFormat("%sSettingValue%d", shaderInfo->section.c_str(), i + 1);
|
||||
bool keyExisted = g_Config.mPostShaderSetting.find(key) != g_Config.mPostShaderSetting.end();
|
||||
auto &value = g_Config.mPostShaderSetting[key];
|
||||
if (!keyExisted)
|
||||
value = setting.value;
|
||||
|
||||
if (duplicated) {
|
||||
auto sliderName = StringFromFormat("%s %s", ps->T(setting.name), ps->T("(duplicated setting, previous slider will be used)"));
|
||||
PopupSliderChoiceFloat *settingValue = settingContainer->Add(new PopupSliderChoiceFloat(&value, setting.minValue, setting.maxValue, sliderName, setting.step, screenManager()));
|
||||
|
||||
Reference in new issue
Block a user