diff options
| author | 2020-11-04 04:16:34 -0500 | |
|---|---|---|
| committer | 2020-11-04 04:16:37 -0500 | |
| commit | 7aae6d6d2bd9784cba5df5b98cd29198456dcbeb (patch) | |
| tree | ce40aa9bdfb1a7e6c1827681b68dee50c6f47623 /src/core/settings.h | |
| parent | Merge pull request #4887 from lioncash/common-build (diff) | |
| download | yuzu-7aae6d6d2bd9784cba5df5b98cd29198456dcbeb.tar.gz yuzu-7aae6d6d2bd9784cba5df5b98cd29198456dcbeb.tar.xz yuzu-7aae6d6d2bd9784cba5df5b98cd29198456dcbeb.zip | |
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.
Diffstat (limited to 'src/core/settings.h')
| -rw-r--r-- | src/core/settings.h | 11 |
1 files changed, 7 insertions, 4 deletions
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 { | |||
| 33 | DebugMode = 2, | 33 | DebugMode = 2, |
| 34 | }; | 34 | }; |
| 35 | 35 | ||
| 36 | extern bool configuring_global; | ||
| 37 | |||
| 38 | template <typename Type> | 36 | template <typename Type> |
| 39 | class Setting final { | 37 | class Setting final { |
| 40 | public: | 38 | public: |
| @@ -198,13 +196,18 @@ struct Values { | |||
| 198 | 196 | ||
| 199 | // Add-Ons | 197 | // Add-Ons |
| 200 | std::map<u64, std::vector<std::string>> disabled_addons; | 198 | std::map<u64, std::vector<std::string>> disabled_addons; |
| 201 | } extern values; | 199 | }; |
| 202 | 200 | ||
| 203 | float Volume(); | 201 | extern Values values; |
| 202 | |||
| 203 | bool IsConfiguringGlobal(); | ||
| 204 | void SetConfiguringGlobal(bool is_global); | ||
| 204 | 205 | ||
| 205 | bool IsGPULevelExtreme(); | 206 | bool IsGPULevelExtreme(); |
| 206 | bool IsGPULevelHigh(); | 207 | bool IsGPULevelHigh(); |
| 207 | 208 | ||
| 209 | float Volume(); | ||
| 210 | |||
| 208 | std::string GetTimeZoneString(); | 211 | std::string GetTimeZoneString(); |
| 209 | 212 | ||
| 210 | void Apply(); | 213 | void Apply(); |