From 7aae6d6d2bd9784cba5df5b98cd29198456dcbeb Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 4 Nov 2020 04:16:34 -0500 Subject: core/settings: Move configuring_global behind an API Rather than have directly modified global state here, we can make it an implementation detail and have an interface that changes are queried through. --- src/core/settings.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/core/settings.h') diff --git a/src/core/settings.h b/src/core/settings.h index 604805615..dcb1dbb31 100644 --- a/src/core/settings.h +++ b/src/core/settings.h @@ -33,8 +33,6 @@ enum class CPUAccuracy { DebugMode = 2, }; -extern bool configuring_global; - template class Setting final { public: @@ -198,13 +196,18 @@ struct Values { // Add-Ons std::map> disabled_addons; -} extern values; +}; -float Volume(); +extern Values values; + +bool IsConfiguringGlobal(); +void SetConfiguringGlobal(bool is_global); bool IsGPULevelExtreme(); bool IsGPULevelHigh(); +float Volume(); + std::string GetTimeZoneString(); void Apply(); -- cgit v1.2.3