Forráskód Böngészése

settings: Add docked mode helper function

lat9nq 2 éve
szülő
commit
ab862207d7
2 módosított fájl, 7 hozzáadás és 0 törlés
  1. 5 0
      src/common/settings.cpp
  2. 2 0
      src/common/settings.h

+ 5 - 0
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;

+ 2 - 0
src/common/settings.h

@@ -525,6 +525,8 @@ bool IsGPULevelHigh();
 
 bool IsFastmemEnabled();
 
+bool IsDockedMode();
+
 float Volume();
 
 std::string GetTimeZoneString(TimeZone time_zone);