mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 06:39:46 -06:00
Common/Config: Add a utility class to suppress config change callbacks.
This commit is contained in:
@ -96,4 +96,15 @@ void SetBaseOrCurrent(const ConfigInfo<T>& info, const std::common_type_t<T>& va
|
||||
else
|
||||
Set<T>(LayerType::CurrentRun, info, value);
|
||||
}
|
||||
}
|
||||
|
||||
// Used to defer InvokeConfigChangedCallbacks until after the completion of many config changes.
|
||||
class ConfigChangeCallbackGuard
|
||||
{
|
||||
public:
|
||||
ConfigChangeCallbackGuard();
|
||||
~ConfigChangeCallbackGuard();
|
||||
|
||||
ConfigChangeCallbackGuard(const ConfigChangeCallbackGuard&) = delete;
|
||||
ConfigChangeCallbackGuard& operator=(const ConfigChangeCallbackGuard&) = delete;
|
||||
};
|
||||
} // namespace Config
|
||||
|
Reference in New Issue
Block a user