From fe3bf4f07547b848bc2b79605c4bcabb07642662 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 2 Jan 2019 15:26:41 -0500 Subject: service/vi: Document unknown DisplayInfo struct members It appears that the two members indicate whether a display has a bounded number of layers (and if set, the second member indicates the total number of layers). --- src/core/hle/service/vi/vi.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'src/core/hle/service/vi/vi.cpp') diff --git a/src/core/hle/service/vi/vi.cpp b/src/core/hle/service/vi/vi.cpp index 311b0c765..593e26ea8 100644 --- a/src/core/hle/service/vi/vi.cpp +++ b/src/core/hle/service/vi/vi.cpp @@ -32,10 +32,21 @@ namespace Service::VI { struct DisplayInfo { + /// The name of this particular display. char display_name[0x40]{"Default"}; - u64 unknown_1{1}; - u64 unknown_2{1}; + + /// Whether or not the display has a limited number of layers. + u8 has_limited_layers{1}; + INSERT_PADDING_BYTES(7){}; + + /// Indicates the total amount of layers supported by the display. + /// @note This is only valid if has_limited_layers is set. + u64 max_layers{1}; + + /// Maximum width in pixels. u64 width{1280}; + + /// Maximum height in pixels. u64 height{720}; }; static_assert(sizeof(DisplayInfo) == 0x60, "DisplayInfo has wrong size"); -- cgit v1.2.3 From 351f010cfc1c23e4003856b2e80089c99aca1e64 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 2 Jan 2019 16:14:40 -0500 Subject: service/vi: Correct initial width and height values Based off RE, it appears that almost all display types seem to use 1920x1080 except for a few (null display, edid display). --- src/core/hle/service/vi/vi.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core/hle/service/vi/vi.cpp') diff --git a/src/core/hle/service/vi/vi.cpp b/src/core/hle/service/vi/vi.cpp index 593e26ea8..b3e0aab11 100644 --- a/src/core/hle/service/vi/vi.cpp +++ b/src/core/hle/service/vi/vi.cpp @@ -44,10 +44,10 @@ struct DisplayInfo { u64 max_layers{1}; /// Maximum width in pixels. - u64 width{1280}; + u64 width{1920}; /// Maximum height in pixels. - u64 height{720}; + u64 height{1080}; }; static_assert(sizeof(DisplayInfo) == 0x60, "DisplayInfo has wrong size"); -- cgit v1.2.3