diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/frontend/applets/controller.cpp | 3 | ||||
-rw-r--r-- | src/core/frontend/framebuffer_layout.cpp | 4 | ||||
-rw-r--r-- | src/core/hle/service/am/am.cpp | 6 | ||||
-rw-r--r-- | src/core/hle/service/apm/apm_controller.cpp | 6 | ||||
-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 | ||||
-rw-r--r-- | src/core/telemetry_session.cpp | 4 |
8 files changed, 19 insertions, 10 deletions
diff --git a/src/core/frontend/applets/controller.cpp b/src/core/frontend/applets/controller.cpp index 3300d4f79..4c0c5434c 100644 --- a/src/core/frontend/applets/controller.cpp +++ b/src/core/frontend/applets/controller.cpp @@ -3,6 +3,7 @@ #include "common/assert.h" #include "common/logging/log.h" +#include "common/settings_enums.h" #include "core/frontend/applets/controller.h" #include "core/hid/emulated_controller.h" #include "core/hid/hid_core.h" @@ -62,7 +63,7 @@ void DefaultControllerApplet::ReconfigureControllers(ReconfigureCallback callbac controller->Connect(true); } } else if (index == 0 && parameters.enable_single_mode && parameters.allow_handheld && - !Settings::values.use_docked_mode.GetValue()) { + Settings::values.use_docked_mode.GetValue() == Settings::ConsoleMode::Handheld) { // We should *never* reach here under any normal circumstances. controller->SetNpadStyleIndex(Core::HID::NpadStyleIndex::Handheld); controller->Connect(true); diff --git a/src/core/frontend/framebuffer_layout.cpp b/src/core/frontend/framebuffer_layout.cpp index b4081fc39..ae0a44f12 100644 --- a/src/core/frontend/framebuffer_layout.cpp +++ b/src/core/frontend/framebuffer_layout.cpp @@ -5,6 +5,7 @@ #include "common/assert.h" #include "common/settings.h" +#include "common/settings_enums.h" #include "core/frontend/framebuffer_layout.h" namespace Layout { @@ -49,7 +50,8 @@ FramebufferLayout DefaultFrameLayout(u32 width, u32 height) { } FramebufferLayout FrameLayoutFromResolutionScale(f32 res_scale) { - const bool is_docked = Settings::values.use_docked_mode.GetValue(); + const bool is_docked = + Settings::values.use_docked_mode.GetValue() == Settings::ConsoleMode::Docked; const u32 screen_width = is_docked ? ScreenDocked::Width : ScreenUndocked::Width; const u32 screen_height = is_docked ? ScreenDocked::Height : ScreenUndocked::Height; diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index 8d057b3a8..81df91a2d 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp @@ -6,6 +6,7 @@ #include <cinttypes> #include <cstring> #include "common/settings.h" +#include "common/settings_enums.h" #include "core/core.h" #include "core/file_sys/control_metadata.h" #include "core/file_sys/patch_manager.h" @@ -833,7 +834,7 @@ void ICommonStateGetter::GetDefaultDisplayResolution(HLERequestContext& ctx) { IPC::ResponseBuilder rb{ctx, 4}; rb.Push(ResultSuccess); - if (Settings::values.use_docked_mode.GetValue()) { + if (Settings::values.use_docked_mode.GetValue() == Settings::ConsoleMode::Docked) { rb.Push(static_cast<u32>(Service::VI::DisplayResolution::DockedWidth)); rb.Push(static_cast<u32>(Service::VI::DisplayResolution::DockedHeight)); } else { @@ -921,7 +922,8 @@ void IStorage::Open(HLERequestContext& ctx) { } void ICommonStateGetter::GetOperationMode(HLERequestContext& ctx) { - const bool use_docked_mode{Settings::values.use_docked_mode.GetValue()}; + const bool use_docked_mode{Settings::values.use_docked_mode.GetValue() == + Settings::ConsoleMode::Docked}; LOG_DEBUG(Service_AM, "called, use_docked_mode={}", use_docked_mode); 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..1656b2e73 100644 --- a/src/core/hle/service/apm/apm_controller.cpp +++ b/src/core/hle/service/apm/apm_controller.cpp @@ -7,6 +7,7 @@ #include "common/logging/log.h" #include "common/settings.h" +#include "common/settings_enums.h" #include "core/core_timing.h" #include "core/hle/service/apm/apm_controller.h" @@ -67,8 +68,9 @@ void Controller::SetFromCpuBoostMode(CpuBoostMode mode) { } PerformanceMode Controller::GetCurrentPerformanceMode() const { - return Settings::values.use_docked_mode.GetValue() ? PerformanceMode::Boost - : PerformanceMode::Normal; + return Settings::values.use_docked_mode.GetValue() == Settings::ConsoleMode::Docked + ? PerformanceMode::Boost + : PerformanceMode::Normal; } 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..47d4c08fc 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() }; // Hack: There is no touch in docked but games still allow it - if (Settings::values.use_docked_mode.GetValue()) { + if (Settings::values.use_docked_mode.GetValue() == Settings::ConsoleMode::Docked) { gesture.points[id] = { .x = static_cast<s32>(active_x * Layout::ScreenDocked::Width), .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..ba752d472 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 return false; } // Handheld shouldn't be supported in docked mode - if (Settings::values.use_docked_mode.GetValue()) { + if (Settings::values.use_docked_mode.GetValue() == Settings::ConsoleMode::Docked) { return false; } diff --git a/src/core/hle/service/vi/vi.cpp b/src/core/hle/service/vi/vi.cpp index 6bb02393c..6b5f3a17a 100644 --- a/src/core/hle/service/vi/vi.cpp +++ b/src/core/hle/service/vi/vi.cpp @@ -217,7 +217,7 @@ private: IPC::ResponseBuilder rb{ctx, 6}; rb.Push(ResultSuccess); - if (Settings::values.use_docked_mode.GetValue()) { + if (Settings::values.use_docked_mode.GetValue() == Settings::ConsoleMode::Docked) { rb.Push(static_cast<u32>(Service::VI::DisplayResolution::DockedWidth)); rb.Push(static_cast<u32>(Service::VI::DisplayResolution::DockedHeight)); } else { diff --git a/src/core/telemetry_session.cpp b/src/core/telemetry_session.cpp index 62b3f6636..8a1cd24b0 100644 --- a/src/core/telemetry_session.cpp +++ b/src/core/telemetry_session.cpp @@ -14,6 +14,7 @@ #include "common/logging/log.h" #include "common/settings.h" +#include "common/settings_enums.h" #include "core/file_sys/control_metadata.h" #include "core/file_sys/patch_manager.h" #include "core/loader/loader.h" @@ -275,7 +276,8 @@ void TelemetrySession::AddInitialInfo(Loader::AppLoader& app_loader, static_cast<u32>(Settings::values.shader_backend.GetValue())); AddField(field_type, "Renderer_UseAsynchronousShaders", Settings::values.use_asynchronous_shaders.GetValue()); - AddField(field_type, "System_UseDockedMode", Settings::values.use_docked_mode.GetValue()); + AddField(field_type, "System_UseDockedMode", + Settings::values.use_docked_mode.GetValue() == Settings::ConsoleMode::Docked); } bool TelemetrySession::SubmitTestcase() { |