summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 cf94b00e6..015b42cfd 100644
--- a/src/core/hle/service/vi/vi.cpp
+++ b/src/core/hle/service/vi/vi.cpp
@@ -609,7 +609,7 @@ public:
609 {3000, nullptr, "ListDisplayModes"}, 609 {3000, nullptr, "ListDisplayModes"},
610 {3001, nullptr, "ListDisplayRgbRanges"}, 610 {3001, nullptr, "ListDisplayRgbRanges"},
611 {3002, nullptr, "ListDisplayContentTypes"}, 611 {3002, nullptr, "ListDisplayContentTypes"},
612 {3200, nullptr, "GetDisplayMode"}, 612 {3200, &ISystemDisplayService::GetDisplayMode, "GetDisplayMode"},
613 {3201, nullptr, "SetDisplayMode"}, 613 {3201, nullptr, "SetDisplayMode"},
614 {3202, nullptr, "GetDisplayUnderscan"}, 614 {3202, nullptr, "GetDisplayUnderscan"},
615 {3203, nullptr, "SetDisplayUnderscan"}, 615 {3203, nullptr, "SetDisplayUnderscan"},
@@ -660,6 +660,24 @@ private:
660 LOG_WARNING(Service_VI, "(STUBBED) called, layer_id=0x{:08X}, visibility={}", layer_id, 660 LOG_WARNING(Service_VI, "(STUBBED) called, layer_id=0x{:08X}, visibility={}", layer_id,
661 visibility); 661 visibility);
662 } 662 }
663
664 void GetDisplayMode(Kernel::HLERequestContext& ctx) {
665 IPC::ResponseBuilder rb{ctx, 6};
666 rb.Push(RESULT_SUCCESS);
667
668 if (Settings::values.use_docked_mode) {
669 rb.Push(static_cast<u32>(Service::VI::DisplayResolution::DockedWidth));
670 rb.Push(static_cast<u32>(Service::VI::DisplayResolution::DockedHeight));
671 } else {
672 rb.Push(static_cast<u32>(Service::VI::DisplayResolution::UndockedWidth));
673 rb.Push(static_cast<u32>(Service::VI::DisplayResolution::UndockedHeight));
674 }
675
676 rb.PushRaw<float>(60.0f);
677 rb.Push<u32>(0);
678
679 LOG_DEBUG(Service_VI, "called");
680 }
663}; 681};
664 682
665class IManagerDisplayService final : public ServiceFramework<IManagerDisplayService> { 683class IManagerDisplayService final : public ServiceFramework<IManagerDisplayService> {