summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/vi/vi.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/core/hle/service/vi/vi.cpp b/src/core/hle/service/vi/vi.cpp
index 2ee60f1ec..bbc02abcc 100644
--- a/src/core/hle/service/vi/vi.cpp
+++ b/src/core/hle/service/vi/vi.cpp
@@ -612,7 +612,7 @@ public:
612 {3000, nullptr, "ListDisplayModes"}, 612 {3000, nullptr, "ListDisplayModes"},
613 {3001, nullptr, "ListDisplayRgbRanges"}, 613 {3001, nullptr, "ListDisplayRgbRanges"},
614 {3002, nullptr, "ListDisplayContentTypes"}, 614 {3002, nullptr, "ListDisplayContentTypes"},
615 {3200, nullptr, "GetDisplayMode"}, 615 {3200, &ISystemDisplayService::GetDisplayMode, "GetDisplayMode"},
616 {3201, nullptr, "SetDisplayMode"}, 616 {3201, nullptr, "SetDisplayMode"},
617 {3202, nullptr, "GetDisplayUnderscan"}, 617 {3202, nullptr, "GetDisplayUnderscan"},
618 {3203, nullptr, "SetDisplayUnderscan"}, 618 {3203, nullptr, "SetDisplayUnderscan"},
@@ -663,6 +663,24 @@ private:
663 LOG_WARNING(Service_VI, "(STUBBED) called, layer_id=0x{:08X}, visibility={}", layer_id, 663 LOG_WARNING(Service_VI, "(STUBBED) called, layer_id=0x{:08X}, visibility={}", layer_id,
664 visibility); 664 visibility);
665 } 665 }
666
667 void GetDisplayMode(Kernel::HLERequestContext& ctx) {
668 IPC::ResponseBuilder rb{ctx, 6};
669 rb.Push(RESULT_SUCCESS);
670
671 if (Settings::values.use_docked_mode) {
672 rb.Push(static_cast<u32>(Service::VI::DisplayResolution::DockedWidth));
673 rb.Push(static_cast<u32>(Service::VI::DisplayResolution::DockedHeight));
674 } else {
675 rb.Push(static_cast<u32>(Service::VI::DisplayResolution::UndockedWidth));
676 rb.Push(static_cast<u32>(Service::VI::DisplayResolution::UndockedHeight));
677 }
678
679 rb.PushRaw<float>(60.0f);
680 rb.Push<u32>(0);
681
682 LOG_DEBUG(Service_VI, "called");
683 }
666}; 684};
667 685
668class IManagerDisplayService final : public ServiceFramework<IManagerDisplayService> { 686class IManagerDisplayService final : public ServiceFramework<IManagerDisplayService> {