summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlat9nq <22451773+lat9nq@users.noreply.github.com>2023-08-23 03:58:09 +0200
committerlat9nq <22451773+lat9nq@users.noreply.github.com>2023-08-23 03:58:09 +0200
commitab862207d7f2de712e1f711141d20921b414cdf7 (patch)
tree268ab775ffb7fefcdf78f85c99e2c392f9ab56d7
parentconfig(qt): Sanitize docked handheld controller (diff)
downloadyuzu-ab862207d7f2de712e1f711141d20921b414cdf7.tar
yuzu-ab862207d7f2de712e1f711141d20921b414cdf7.tar.gz
yuzu-ab862207d7f2de712e1f711141d20921b414cdf7.tar.bz2
yuzu-ab862207d7f2de712e1f711141d20921b414cdf7.tar.lz
yuzu-ab862207d7f2de712e1f711141d20921b414cdf7.tar.xz
yuzu-ab862207d7f2de712e1f711141d20921b414cdf7.tar.zst
yuzu-ab862207d7f2de712e1f711141d20921b414cdf7.zip
-rw-r--r--src/common/settings.cpp5
-rw-r--r--src/common/settings.h2
2 files changed, 7 insertions, 0 deletions
diff --git a/src/common/settings.cpp b/src/common/settings.cpp
index 16a58a750..524056841 100644
--- a/src/common/settings.cpp
+++ b/src/common/settings.cpp
@@ -2,6 +2,7 @@
// SPDX-License-Identifier: GPL-2.0-or-later
#include <version>
+#include "common/settings_enums.h"
#if __cpp_lib_chrono >= 201907L
#include <chrono>
#include <exception>
@@ -145,6 +146,10 @@ bool IsFastmemEnabled() {
return true;
}
+bool IsDockedMode() {
+ return values.use_docked_mode.GetValue() == Settings::ConsoleMode::Docked;
+}
+
float Volume() {
if (values.audio_muted) {
return 0.0f;
diff --git a/src/common/settings.h b/src/common/settings.h
index 6d44fc626..b15213bd7 100644
--- a/src/common/settings.h
+++ b/src/common/settings.h
@@ -525,6 +525,8 @@ bool IsGPULevelHigh();
bool IsFastmemEnabled();
+bool IsDockedMode();
+
float Volume();
std::string GetTimeZoneString(TimeZone time_zone);