diff options
author | bunnei <bunneidev@gmail.com> | 2020-11-05 02:09:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-05 02:09:19 +0100 |
commit | d62d28522b7ac49dcf76b82337d0963152d04feb (patch) | |
tree | 95f6d17dc15443b9870c03ea7930d9c9866873c2 /src/core/settings.cpp | |
parent | Merge pull request #4858 from lioncash/initializer (diff) | |
parent | core/settings: Move configuring_global behind an API (diff) | |
download | yuzu-d62d28522b7ac49dcf76b82337d0963152d04feb.tar yuzu-d62d28522b7ac49dcf76b82337d0963152d04feb.tar.gz yuzu-d62d28522b7ac49dcf76b82337d0963152d04feb.tar.bz2 yuzu-d62d28522b7ac49dcf76b82337d0963152d04feb.tar.lz yuzu-d62d28522b7ac49dcf76b82337d0963152d04feb.tar.xz yuzu-d62d28522b7ac49dcf76b82337d0963152d04feb.tar.zst yuzu-d62d28522b7ac49dcf76b82337d0963152d04feb.zip |
Diffstat (limited to 'src/core/settings.cpp')
-rw-r--r-- | src/core/settings.cpp | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/core/settings.cpp b/src/core/settings.cpp index e14c02045..a99d3cf5a 100644 --- a/src/core/settings.cpp +++ b/src/core/settings.cpp @@ -14,7 +14,7 @@ namespace Settings { Values values = {}; -bool configuring_global = true; +static bool configuring_global = true; std::string GetTimeZoneString() { static constexpr std::array timezones{ @@ -81,11 +81,12 @@ void LogSettings() { log_setting("Services_BCATBoxcatLocal", values.bcat_boxcat_local); } -float Volume() { - if (values.audio_muted) { - return 0.0f; - } - return values.volume.GetValue(); +bool IsConfiguringGlobal() { + return configuring_global; +} + +void SetConfiguringGlobal(bool is_global) { + configuring_global = is_global; } bool IsGPULevelExtreme() { @@ -97,6 +98,13 @@ bool IsGPULevelHigh() { values.gpu_accuracy.GetValue() == GPUAccuracy::High; } +float Volume() { + if (values.audio_muted) { + return 0.0f; + } + return values.volume.GetValue(); +} + void RestoreGlobalState() { // If a game is running, DO NOT restore the global settings state if (Core::System::GetInstance().IsPoweredOn()) { |