From bf036b46fc74fc295ce24431bee3d0320c3a6576 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 4 Jan 2019 18:43:15 -0500 Subject: service/vi: Correct reported dimensions from IApplicationDisplayService's GetDisplayResolution() Within the actual service, it makes no distinguishing between docked and undocked modes. This will always return the constants values reporting 1280x720 as the dimensions. --- src/core/hle/service/vi/vi.cpp | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/src/core/hle/service/vi/vi.cpp b/src/core/hle/service/vi/vi.cpp index 8528925ec..1bdf19e13 100644 --- a/src/core/hle/service/vi/vi.cpp +++ b/src/core/hle/service/vi/vi.cpp @@ -958,22 +958,18 @@ private: IPC::RequestParser rp{ctx}; const u64 display_id = rp.Pop(); - LOG_WARNING(Service_VI, "(STUBBED) called. display_id=0x{:016X}", display_id); + LOG_DEBUG(Service_VI, "called. display_id=0x{:016X}", display_id); IPC::ResponseBuilder rb{ctx, 6}; rb.Push(RESULT_SUCCESS); - if (Settings::values.use_docked_mode) { - rb.Push(static_cast(DisplayResolution::DockedWidth) * - static_cast(Settings::values.resolution_factor)); - rb.Push(static_cast(DisplayResolution::DockedHeight) * - static_cast(Settings::values.resolution_factor)); - } else { - rb.Push(static_cast(DisplayResolution::UndockedWidth) * - static_cast(Settings::values.resolution_factor)); - rb.Push(static_cast(DisplayResolution::UndockedHeight) * - static_cast(Settings::values.resolution_factor)); - } + // This only returns the fixed values of 1280x720 and makes no distinguishing + // between docked and undocked dimensions. We take the liberty of applying + // the resolution scaling factor here. + rb.Push(static_cast(DisplayResolution::UndockedWidth) * + static_cast(Settings::values.resolution_factor)); + rb.Push(static_cast(DisplayResolution::UndockedHeight) * + static_cast(Settings::values.resolution_factor)); } void SetLayerScalingMode(Kernel::HLERequestContext& ctx) { -- cgit v1.2.3