summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-09-30 21:39:54 +0200
committerGitHub <noreply@github.com>2018-09-30 21:39:54 +0200
commit8f2ad3a66d937379bee714c74839a45d2554444f (patch)
tree1d552c4ab9e8a0154a542e6964e7cafc99a27236 /src/core
parentMerge pull request #1417 from lioncash/context (diff)
parentImplement ISystemDisplayService::GetDisplayMode (diff)
downloadyuzu-8f2ad3a66d937379bee714c74839a45d2554444f.tar
yuzu-8f2ad3a66d937379bee714c74839a45d2554444f.tar.gz
yuzu-8f2ad3a66d937379bee714c74839a45d2554444f.tar.bz2
yuzu-8f2ad3a66d937379bee714c74839a45d2554444f.tar.lz
yuzu-8f2ad3a66d937379bee714c74839a45d2554444f.tar.xz
yuzu-8f2ad3a66d937379bee714c74839a45d2554444f.tar.zst
yuzu-8f2ad3a66d937379bee714c74839a45d2554444f.zip
Diffstat (limited to 'src/core')
-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:
{3000, nullptr, "ListDisplayModes"},
{3001, nullptr, "ListDisplayRgbRanges"},
{3002, nullptr, "ListDisplayContentTypes"},
- {3200, nullptr, "GetDisplayMode"},
+ {3200, &ISystemDisplayService::GetDisplayMode, "GetDisplayMode"},
{3201, nullptr, "SetDisplayMode"},
{3202, nullptr, "GetDisplayUnderscan"},
{3203, nullptr, "SetDisplayUnderscan"},
@@ -663,6 +663,24 @@ private:
LOG_WARNING(Service_VI, "(STUBBED) called, layer_id=0x{:08X}, visibility={}", layer_id,
visibility);
}
+
+ void GetDisplayMode(Kernel::HLERequestContext& ctx) {
+ IPC::ResponseBuilder rb{ctx, 6};
+ rb.Push(RESULT_SUCCESS);
+
+ if (Settings::values.use_docked_mode) {
+ rb.Push(static_cast<u32>(Service::VI::DisplayResolution::DockedWidth));
+ rb.Push(static_cast<u32>(Service::VI::DisplayResolution::DockedHeight));
+ } else {
+ rb.Push(static_cast<u32>(Service::VI::DisplayResolution::UndockedWidth));
+ rb.Push(static_cast<u32>(Service::VI::DisplayResolution::UndockedHeight));
+ }
+
+ rb.PushRaw<float>(60.0f);
+ rb.Push<u32>(0);
+
+ LOG_DEBUG(Service_VI, "called");
+ }
};
class IManagerDisplayService final : public ServiceFramework<IManagerDisplayService> {