diff options
author | bunnei <bunneidev@gmail.com> | 2018-02-07 16:51:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-07 16:51:35 +0100 |
commit | 869d65e923ced3c71c771c2da97a07ba78ff7d9d (patch) | |
tree | 9bb1128673a0e925389bc84f39a6a934c3e1b5dd /src/core/hle/service/vi | |
parent | Merge pull request #166 from mailwl/hid-SetNpadHandhelpActivationMode (diff) | |
parent | Service: stub some functions in am, audio, time, vi services (diff) | |
download | yuzu-869d65e923ced3c71c771c2da97a07ba78ff7d9d.tar yuzu-869d65e923ced3c71c771c2da97a07ba78ff7d9d.tar.gz yuzu-869d65e923ced3c71c771c2da97a07ba78ff7d9d.tar.bz2 yuzu-869d65e923ced3c71c771c2da97a07ba78ff7d9d.tar.lz yuzu-869d65e923ced3c71c771c2da97a07ba78ff7d9d.tar.xz yuzu-869d65e923ced3c71c771c2da97a07ba78ff7d9d.tar.zst yuzu-869d65e923ced3c71c771c2da97a07ba78ff7d9d.zip |
Diffstat (limited to '')
-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); |