From ab862207d7f2de712e1f711141d20921b414cdf7 Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Tue, 22 Aug 2023 21:58:09 -0400 Subject: [PATCH] settings: Add docked mode helper function --- src/common/settings.cpp | 5 +++++ src/common/settings.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/common/settings.cpp b/src/common/settings.cpp index 16a58a7506..5240568417 100644 --- a/src/common/settings.cpp +++ b/src/common/settings.cpp @@ -2,6 +2,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later #include +#include "common/settings_enums.h" #if __cpp_lib_chrono >= 201907L #include #include @@ -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 6d44fc6260..b15213bd72 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);