diff options
| author | 2023-08-26 19:15:00 -0400 | |
|---|---|---|
| committer | 2023-08-26 19:15:00 -0400 | |
| commit | 6c4abd23be375afda850661cdf164b65e52f8cb8 (patch) | |
| tree | 4245dfb837da484556040bb02915d0e7b53569c8 /src/core/hle | |
| parent | Merge pull request #11359 from Kelebek1/check_suitable_backend (diff) | |
| parent | main: Fix docked mode button, clang 14 error (diff) | |
| download | yuzu-6c4abd23be375afda850661cdf164b65e52f8cb8.tar.gz yuzu-6c4abd23be375afda850661cdf164b65e52f8cb8.tar.xz yuzu-6c4abd23be375afda850661cdf164b65e52f8cb8.zip | |
Merge pull request #11356 from lat9nq/console-mode-pg
general,config-qt: Present Console Mode as an enum with separate options in game properties
Diffstat (limited to 'src/core/hle')
| -rw-r--r-- | src/core/hle/service/am/am.cpp | 5 | ||||
| -rw-r--r-- | src/core/hle/service/apm/apm_controller.cpp | 4 | ||||
| -rw-r--r-- | src/core/hle/service/hid/controllers/gesture.cpp | 2 | ||||
| -rw-r--r-- | src/core/hle/service/hid/controllers/npad.cpp | 2 | ||||
| -rw-r--r-- | src/core/hle/service/vi/vi.cpp | 2 |
5 files changed, 8 insertions, 7 deletions
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index 8d057b3a8..da33f0e44 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp | |||
| @@ -6,6 +6,7 @@ | |||
| 6 | #include <cinttypes> | 6 | #include <cinttypes> |
| 7 | #include <cstring> | 7 | #include <cstring> |
| 8 | #include "common/settings.h" | 8 | #include "common/settings.h" |
| 9 | #include "common/settings_enums.h" | ||
| 9 | #include "core/core.h" | 10 | #include "core/core.h" |
| 10 | #include "core/file_sys/control_metadata.h" | 11 | #include "core/file_sys/control_metadata.h" |
| 11 | #include "core/file_sys/patch_manager.h" | 12 | #include "core/file_sys/patch_manager.h" |
| @@ -833,7 +834,7 @@ void ICommonStateGetter::GetDefaultDisplayResolution(HLERequestContext& ctx) { | |||
| 833 | IPC::ResponseBuilder rb{ctx, 4}; | 834 | IPC::ResponseBuilder rb{ctx, 4}; |
| 834 | rb.Push(ResultSuccess); | 835 | rb.Push(ResultSuccess); |
| 835 | 836 | ||
| 836 | if (Settings::values.use_docked_mode.GetValue()) { | 837 | if (Settings::IsDockedMode()) { |
| 837 | rb.Push(static_cast<u32>(Service::VI::DisplayResolution::DockedWidth)); | 838 | rb.Push(static_cast<u32>(Service::VI::DisplayResolution::DockedWidth)); |
| 838 | rb.Push(static_cast<u32>(Service::VI::DisplayResolution::DockedHeight)); | 839 | rb.Push(static_cast<u32>(Service::VI::DisplayResolution::DockedHeight)); |
| 839 | } else { | 840 | } else { |
| @@ -921,7 +922,7 @@ void IStorage::Open(HLERequestContext& ctx) { | |||
| 921 | } | 922 | } |
| 922 | 923 | ||
| 923 | void ICommonStateGetter::GetOperationMode(HLERequestContext& ctx) { | 924 | void ICommonStateGetter::GetOperationMode(HLERequestContext& ctx) { |
| 924 | const bool use_docked_mode{Settings::values.use_docked_mode.GetValue()}; | 925 | const bool use_docked_mode{Settings::IsDockedMode()}; |
| 925 | LOG_DEBUG(Service_AM, "called, use_docked_mode={}", use_docked_mode); | 926 | LOG_DEBUG(Service_AM, "called, use_docked_mode={}", use_docked_mode); |
| 926 | 927 | ||
| 927 | IPC::ResponseBuilder rb{ctx, 3}; | 928 | IPC::ResponseBuilder rb{ctx, 3}; |
diff --git a/src/core/hle/service/apm/apm_controller.cpp b/src/core/hle/service/apm/apm_controller.cpp index 227fdd0cf..4f1aa5cc2 100644 --- a/src/core/hle/service/apm/apm_controller.cpp +++ b/src/core/hle/service/apm/apm_controller.cpp | |||
| @@ -7,6 +7,7 @@ | |||
| 7 | 7 | ||
| 8 | #include "common/logging/log.h" | 8 | #include "common/logging/log.h" |
| 9 | #include "common/settings.h" | 9 | #include "common/settings.h" |
| 10 | #include "common/settings_enums.h" | ||
| 10 | #include "core/core_timing.h" | 11 | #include "core/core_timing.h" |
| 11 | #include "core/hle/service/apm/apm_controller.h" | 12 | #include "core/hle/service/apm/apm_controller.h" |
| 12 | 13 | ||
| @@ -67,8 +68,7 @@ void Controller::SetFromCpuBoostMode(CpuBoostMode mode) { | |||
| 67 | } | 68 | } |
| 68 | 69 | ||
| 69 | PerformanceMode Controller::GetCurrentPerformanceMode() const { | 70 | PerformanceMode Controller::GetCurrentPerformanceMode() const { |
| 70 | return Settings::values.use_docked_mode.GetValue() ? PerformanceMode::Boost | 71 | return Settings::IsDockedMode() ? PerformanceMode::Boost : PerformanceMode::Normal; |
| 71 | : PerformanceMode::Normal; | ||
| 72 | } | 72 | } |
| 73 | 73 | ||
| 74 | PerformanceConfiguration Controller::GetCurrentPerformanceConfiguration(PerformanceMode mode) { | 74 | PerformanceConfiguration Controller::GetCurrentPerformanceConfiguration(PerformanceMode mode) { |
diff --git a/src/core/hle/service/hid/controllers/gesture.cpp b/src/core/hle/service/hid/controllers/gesture.cpp index 03432f7cb..63eecd42b 100644 --- a/src/core/hle/service/hid/controllers/gesture.cpp +++ b/src/core/hle/service/hid/controllers/gesture.cpp | |||
| @@ -331,7 +331,7 @@ Controller_Gesture::GestureProperties Controller_Gesture::GetGestureProperties() | |||
| 331 | }; | 331 | }; |
| 332 | 332 | ||
| 333 | // Hack: There is no touch in docked but games still allow it | 333 | // Hack: There is no touch in docked but games still allow it |
| 334 | if (Settings::values.use_docked_mode.GetValue()) { | 334 | if (Settings::IsDockedMode()) { |
| 335 | gesture.points[id] = { | 335 | gesture.points[id] = { |
| 336 | .x = static_cast<s32>(active_x * Layout::ScreenDocked::Width), | 336 | .x = static_cast<s32>(active_x * Layout::ScreenDocked::Width), |
| 337 | .y = static_cast<s32>(active_y * Layout::ScreenDocked::Height), | 337 | .y = static_cast<s32>(active_y * Layout::ScreenDocked::Height), |
diff --git a/src/core/hle/service/hid/controllers/npad.cpp b/src/core/hle/service/hid/controllers/npad.cpp index 28818c813..3b349b4c4 100644 --- a/src/core/hle/service/hid/controllers/npad.cpp +++ b/src/core/hle/service/hid/controllers/npad.cpp | |||
| @@ -1518,7 +1518,7 @@ bool Controller_NPad::IsControllerSupported(Core::HID::NpadStyleIndex controller | |||
| 1518 | return false; | 1518 | return false; |
| 1519 | } | 1519 | } |
| 1520 | // Handheld shouldn't be supported in docked mode | 1520 | // Handheld shouldn't be supported in docked mode |
| 1521 | if (Settings::values.use_docked_mode.GetValue()) { | 1521 | if (Settings::IsDockedMode()) { |
| 1522 | return false; | 1522 | return false; |
| 1523 | } | 1523 | } |
| 1524 | 1524 | ||
diff --git a/src/core/hle/service/vi/vi.cpp b/src/core/hle/service/vi/vi.cpp index 6bb02393c..2eb978379 100644 --- a/src/core/hle/service/vi/vi.cpp +++ b/src/core/hle/service/vi/vi.cpp | |||
| @@ -217,7 +217,7 @@ private: | |||
| 217 | IPC::ResponseBuilder rb{ctx, 6}; | 217 | IPC::ResponseBuilder rb{ctx, 6}; |
| 218 | rb.Push(ResultSuccess); | 218 | rb.Push(ResultSuccess); |
| 219 | 219 | ||
| 220 | if (Settings::values.use_docked_mode.GetValue()) { | 220 | if (Settings::IsDockedMode()) { |
| 221 | rb.Push(static_cast<u32>(Service::VI::DisplayResolution::DockedWidth)); | 221 | rb.Push(static_cast<u32>(Service::VI::DisplayResolution::DockedWidth)); |
| 222 | rb.Push(static_cast<u32>(Service::VI::DisplayResolution::DockedHeight)); | 222 | rb.Push(static_cast<u32>(Service::VI::DisplayResolution::DockedHeight)); |
| 223 | } else { | 223 | } else { |