diff --git a/src/core/emulator_settings.h b/src/core/emulator_settings.h index 6d9d2ef09..660a1a1a4 100644 --- a/src/core/emulator_settings.h +++ b/src/core/emulator_settings.h @@ -73,8 +73,13 @@ struct Setting { /// Write v to the base layer. /// Game-specific overrides are applied exclusively via Load(serial) - void set(const T& v) { - value = v; + /// Set proper value as base or game_specific + void set(const T& v, bool game_specific = false) { + if (game_specific) { + game_specific_value = v; + } else { + value = v; + } } /// Discard the game-specific override; subsequent get(Default) will @@ -526,15 +531,15 @@ public: auto Get##Name() const { \ return (group).field.get(m_configMode); \ } \ - void Set##Name(const decltype((group).field.value)& v) { \ - (group).field.value = v; \ + void Set##Name(const decltype((group).field.value)& v, bool specific = false) { \ + (group).field.set(v, specific); \ } #define SETTING_FORWARD_BOOL(group, Name, field) \ bool Is##Name() const { \ return (group).field.get(m_configMode); \ } \ - void Set##Name(bool v) { \ - (group).field.value = v; \ + void Set##Name(bool v, bool specific = false) { \ + (group).field.set(v, specific); \ } #define SETTING_FORWARD_BOOL_READONLY(group, Name, field) \ bool Is##Name() const { \ diff --git a/src/core/ipc/ipc.cpp b/src/core/ipc/ipc.cpp index 70180d3bf..16e901a03 100644 --- a/src/core/ipc/ipc.cpp +++ b/src/core/ipc/ipc.cpp @@ -153,7 +153,7 @@ void IPC::InputLoop() { } else if (cmd == "ADJUST_VOLUME") { int value = static_cast(next_u64()); bool is_game_specific = next_u64() != 0; - EmulatorSettings.SetVolumeSlider(value); + EmulatorSettings.SetVolumeSlider(value, is_game_specific); Libraries::AudioOut::AdjustVol(); } else if (cmd == "SET_FSR") { bool use_fsr = next_u64() != 0;