diff options
author | mailwl <mailwl@gmail.com> | 2018-02-07 13:11:17 +0100 |
---|---|---|
committer | mailwl <mailwl@gmail.com> | 2018-02-07 13:11:17 +0100 |
commit | 335096e19a50b38f5ccf81a3d4942a4a0e4dc546 (patch) | |
tree | 9bb1128673a0e925389bc84f39a6a934c3e1b5dd /src/core/hle/service/vi | |
parent | Merge pull request #166 from mailwl/hid-SetNpadHandhelpActivationMode (diff) | |
download | yuzu-335096e19a50b38f5ccf81a3d4942a4a0e4dc546.tar yuzu-335096e19a50b38f5ccf81a3d4942a4a0e4dc546.tar.gz yuzu-335096e19a50b38f5ccf81a3d4942a4a0e4dc546.tar.bz2 yuzu-335096e19a50b38f5ccf81a3d4942a4a0e4dc546.tar.lz yuzu-335096e19a50b38f5ccf81a3d4942a4a0e4dc546.tar.xz yuzu-335096e19a50b38f5ccf81a3d4942a4a0e4dc546.tar.zst yuzu-335096e19a50b38f5ccf81a3d4942a4a0e4dc546.zip |
Diffstat (limited to 'src/core/hle/service/vi')
-rw-r--r-- | src/core/hle/service/vi/vi.cpp | 22 | ||||
-rw-r--r-- | src/core/hle/service/vi/vi.h | 1 |
2 files changed, 22 insertions, 1 deletions
diff --git a/src/core/hle/service/vi/vi.cpp b/src/core/hle/service/vi/vi.cpp index adefba2b7..cfddd7c41 100644 --- a/src/core/hle/service/vi/vi.cpp +++ b/src/core/hle/service/vi/vi.cpp @@ -19,6 +19,15 @@ namespace Service { namespace VI { +struct DisplayInfo { + char display_name[0x40]{"Default"}; + u64 unknown_1{1}; + u64 unknown_2{1}; + u64 width{1920}; + u64 height{1080}; +}; +static_assert(sizeof(DisplayInfo) == 0x60, "DisplayInfo has wrong size"); + class Parcel { public: // This default size was chosen arbitrarily. @@ -722,6 +731,17 @@ void IApplicationDisplayService::SetLayerScalingMode(Kernel::HLERequestContext& rb.Push(RESULT_SUCCESS); } +void IApplicationDisplayService::ListDisplays(Kernel::HLERequestContext& ctx) { + IPC::RequestParser rp{ctx}; + DisplayInfo display_info; + auto& buffer = ctx.BufferDescriptorB()[0]; + Memory::WriteBlock(buffer.Address(), &display_info, sizeof(DisplayInfo)); + IPC::ResponseBuilder rb = rp.MakeBuilder(4, 0, 0); + rb.Push(RESULT_SUCCESS); + rb.Push<u64>(1); + LOG_WARNING(Service_VI, "(STUBBED) called"); +} + void IApplicationDisplayService::GetDisplayVsyncEvent(Kernel::HLERequestContext& ctx) { LOG_WARNING(Service_VI, "(STUBBED) called"); IPC::RequestParser rp{ctx}; @@ -743,7 +763,7 @@ IApplicationDisplayService::IApplicationDisplayService( {102, &IApplicationDisplayService::GetManagerDisplayService, "GetManagerDisplayService"}, {103, &IApplicationDisplayService::GetIndirectDisplayTransactionService, "GetIndirectDisplayTransactionService"}, - {1000, nullptr, "ListDisplays"}, + {1000, &IApplicationDisplayService::ListDisplays, "ListDisplays"}, {1010, &IApplicationDisplayService::OpenDisplay, "OpenDisplay"}, {1020, &IApplicationDisplayService::CloseDisplay, "CloseDisplay"}, {2101, &IApplicationDisplayService::SetLayerScalingMode, "SetLayerScalingMode"}, diff --git a/src/core/hle/service/vi/vi.h b/src/core/hle/service/vi/vi.h index a6e084f87..f6be7d1e6 100644 --- a/src/core/hle/service/vi/vi.h +++ b/src/core/hle/service/vi/vi.h @@ -30,6 +30,7 @@ private: void OpenDisplay(Kernel::HLERequestContext& ctx); void CloseDisplay(Kernel::HLERequestContext& ctx); void SetLayerScalingMode(Kernel::HLERequestContext& ctx); + void ListDisplays(Kernel::HLERequestContext& ctx); void OpenLayer(Kernel::HLERequestContext& ctx); void CreateStrayLayer(Kernel::HLERequestContext& ctx); void DestroyStrayLayer(Kernel::HLERequestContext& ctx); |