summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorGravatar Kewlan2020-06-25 21:05:03 +0200
committerGravatar Kewlan2020-06-26 06:03:29 +0200
commit3eb8efc09574f7a49d11cccecc245674b7282fa2 (patch)
tree5da602910a7699078e570114b834ca7678b99521 /src/core
parentMerge pull request #4141 from Morph1984/SevenSixAxisSensor (diff)
downloadyuzu-3eb8efc09574f7a49d11cccecc245674b7282fa2.tar.gz
yuzu-3eb8efc09574f7a49d11cccecc245674b7282fa2.tar.xz
yuzu-3eb8efc09574f7a49d11cccecc245674b7282fa2.zip
Add a "Mute Audio" hotkey
Diffstat (limited to 'src/core')
-rw-r--r--src/core/settings.cpp7
-rw-r--r--src/core/settings.h3
2 files changed, 10 insertions, 0 deletions
diff --git a/src/core/settings.cpp b/src/core/settings.cpp
index 4edff9cd8..56df5e925 100644
--- a/src/core/settings.cpp
+++ b/src/core/settings.cpp
@@ -127,6 +127,13 @@ void LogSettings() {
127 LogSetting("Services_BCATBoxcatLocal", Settings::values.bcat_boxcat_local); 127 LogSetting("Services_BCATBoxcatLocal", Settings::values.bcat_boxcat_local);
128} 128}
129 129
130float Volume() {
131 if (values.audio_muted) {
132 return 0.0f;
133 }
134 return values.volume;
135}
136
130bool IsGPULevelExtreme() { 137bool IsGPULevelExtreme() {
131 return values.gpu_accuracy == GPUAccuracy::Extreme; 138 return values.gpu_accuracy == GPUAccuracy::Extreme;
132} 139}
diff --git a/src/core/settings.h b/src/core/settings.h
index 33e1e06cd..a598ccbc1 100644
--- a/src/core/settings.h
+++ b/src/core/settings.h
@@ -459,6 +459,7 @@ struct Values {
459 bool use_dev_keys; 459 bool use_dev_keys;
460 460
461 // Audio 461 // Audio
462 bool audio_muted;
462 std::string sink_id; 463 std::string sink_id;
463 bool enable_audio_stretching; 464 bool enable_audio_stretching;
464 std::string audio_device_id; 465 std::string audio_device_id;
@@ -490,6 +491,8 @@ struct Values {
490 std::map<u64, std::vector<std::string>> disabled_addons; 491 std::map<u64, std::vector<std::string>> disabled_addons;
491} extern values; 492} extern values;
492 493
494float Volume();
495
493bool IsGPULevelExtreme(); 496bool IsGPULevelExtreme();
494bool IsGPULevelHigh(); 497bool IsGPULevelHigh();
495 498