diff options
| author | 2018-04-20 16:23:15 -0400 | |
|---|---|---|
| committer | 2018-04-20 16:23:15 -0400 | |
| commit | 1df3a7710e92f7bd79c0779925d00217f2948658 (patch) | |
| tree | 41e0cc2816f9d1b16e51c002c8d8d1cfd14aa8dc /src/core | |
| parent | Merge pull request #367 from lioncash/clamp (diff) | |
| parent | Service/VI: stub SetLayerVisibility, fix GetDisplayResolution output (diff) | |
| download | yuzu-1df3a7710e92f7bd79c0779925d00217f2948658.tar.gz yuzu-1df3a7710e92f7bd79c0779925d00217f2948658.tar.xz yuzu-1df3a7710e92f7bd79c0779925d00217f2948658.zip | |
Merge pull request #340 from mailwl/vi-update
Service/VI: stub SetLayerVisibility, fix GetDisplayResolution output
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/hle/service/vi/vi.cpp | 34 |
1 files changed, 27 insertions, 7 deletions
diff --git a/src/core/hle/service/vi/vi.cpp b/src/core/hle/service/vi/vi.cpp index b697b5f73..36ae2215f 100644 --- a/src/core/hle/service/vi/vi.cpp +++ b/src/core/hle/service/vi/vi.cpp | |||
| @@ -582,7 +582,7 @@ public: | |||
| 582 | {2203, nullptr, "SetLayerSize"}, | 582 | {2203, nullptr, "SetLayerSize"}, |
| 583 | {2204, nullptr, "GetLayerZ"}, | 583 | {2204, nullptr, "GetLayerZ"}, |
| 584 | {2205, &ISystemDisplayService::SetLayerZ, "SetLayerZ"}, | 584 | {2205, &ISystemDisplayService::SetLayerZ, "SetLayerZ"}, |
| 585 | {2207, nullptr, "SetLayerVisibility"}, | 585 | {2207, &ISystemDisplayService::SetLayerVisibility, "SetLayerVisibility"}, |
| 586 | {2209, nullptr, "SetLayerAlpha"}, | 586 | {2209, nullptr, "SetLayerAlpha"}, |
| 587 | {2312, nullptr, "CreateStrayLayer"}, | 587 | {2312, nullptr, "CreateStrayLayer"}, |
| 588 | {2400, nullptr, "OpenIndirectLayer"}, | 588 | {2400, nullptr, "OpenIndirectLayer"}, |
| @@ -632,6 +632,16 @@ private: | |||
| 632 | IPC::ResponseBuilder rb = rp.MakeBuilder(2, 0, 0); | 632 | IPC::ResponseBuilder rb = rp.MakeBuilder(2, 0, 0); |
| 633 | rb.Push(RESULT_SUCCESS); | 633 | rb.Push(RESULT_SUCCESS); |
| 634 | } | 634 | } |
| 635 | |||
| 636 | void SetLayerVisibility(Kernel::HLERequestContext& ctx) { | ||
| 637 | IPC::RequestParser rp{ctx}; | ||
| 638 | u64 layer_id = rp.Pop<u64>(); | ||
| 639 | bool visibility = rp.Pop<bool>(); | ||
| 640 | IPC::ResponseBuilder rb = rp.MakeBuilder(2, 0, 0); | ||
| 641 | rb.Push(RESULT_SUCCESS); | ||
| 642 | LOG_WARNING(Service_VI, "(STUBBED) called, layer_id=0x%x, visibility=%u", layer_id, | ||
| 643 | visibility); | ||
| 644 | } | ||
| 635 | }; | 645 | }; |
| 636 | 646 | ||
| 637 | class IManagerDisplayService final : public ServiceFramework<IManagerDisplayService> { | 647 | class IManagerDisplayService final : public ServiceFramework<IManagerDisplayService> { |
| @@ -663,7 +673,7 @@ public: | |||
| 663 | {4206, nullptr, "SetDefaultDisplay"}, | 673 | {4206, nullptr, "SetDefaultDisplay"}, |
| 664 | {6000, &IManagerDisplayService::AddToLayerStack, "AddToLayerStack"}, | 674 | {6000, &IManagerDisplayService::AddToLayerStack, "AddToLayerStack"}, |
| 665 | {6001, nullptr, "RemoveFromLayerStack"}, | 675 | {6001, nullptr, "RemoveFromLayerStack"}, |
| 666 | {6002, nullptr, "SetLayerVisibility"}, | 676 | {6002, &IManagerDisplayService::SetLayerVisibility, "SetLayerVisibility"}, |
| 667 | {6003, nullptr, "SetLayerConfig"}, | 677 | {6003, nullptr, "SetLayerConfig"}, |
| 668 | {6004, nullptr, "AttachLayerPresentationTracer"}, | 678 | {6004, nullptr, "AttachLayerPresentationTracer"}, |
| 669 | {6005, nullptr, "DetachLayerPresentationTracer"}, | 679 | {6005, nullptr, "DetachLayerPresentationTracer"}, |
| @@ -745,6 +755,16 @@ private: | |||
| 745 | rb.Push(RESULT_SUCCESS); | 755 | rb.Push(RESULT_SUCCESS); |
| 746 | } | 756 | } |
| 747 | 757 | ||
| 758 | void SetLayerVisibility(Kernel::HLERequestContext& ctx) { | ||
| 759 | IPC::RequestParser rp{ctx}; | ||
| 760 | u64 layer_id = rp.Pop<u64>(); | ||
| 761 | bool visibility = rp.Pop<bool>(); | ||
| 762 | IPC::ResponseBuilder rb = rp.MakeBuilder(2, 0, 0); | ||
| 763 | rb.Push(RESULT_SUCCESS); | ||
| 764 | LOG_WARNING(Service_VI, "(STUBBED) called, layer_id=0x%x, visibility=%u", layer_id, | ||
| 765 | visibility); | ||
| 766 | } | ||
| 767 | |||
| 748 | std::shared_ptr<NVFlinger::NVFlinger> nv_flinger; | 768 | std::shared_ptr<NVFlinger::NVFlinger> nv_flinger; |
| 749 | }; | 769 | }; |
| 750 | 770 | ||
| @@ -815,15 +835,15 @@ private: | |||
| 815 | IPC::RequestParser rp{ctx}; | 835 | IPC::RequestParser rp{ctx}; |
| 816 | u64 display_id = rp.Pop<u64>(); | 836 | u64 display_id = rp.Pop<u64>(); |
| 817 | 837 | ||
| 818 | IPC::ResponseBuilder rb = rp.MakeBuilder(4, 0, 0); | 838 | IPC::ResponseBuilder rb = rp.MakeBuilder(6, 0, 0); |
| 819 | rb.Push(RESULT_SUCCESS); | 839 | rb.Push(RESULT_SUCCESS); |
| 820 | 840 | ||
| 821 | if (Settings::values.use_docked_mode) { | 841 | if (Settings::values.use_docked_mode) { |
| 822 | rb.Push(static_cast<u32>(DisplayResolution::DockedWidth)); | 842 | rb.Push(static_cast<u64>(DisplayResolution::DockedWidth)); |
| 823 | rb.Push(static_cast<u32>(DisplayResolution::DockedHeight)); | 843 | rb.Push(static_cast<u64>(DisplayResolution::DockedHeight)); |
| 824 | } else { | 844 | } else { |
| 825 | rb.Push(static_cast<u32>(DisplayResolution::UndockedWidth)); | 845 | rb.Push(static_cast<u64>(DisplayResolution::UndockedWidth)); |
| 826 | rb.Push(static_cast<u32>(DisplayResolution::UndockedHeight)); | 846 | rb.Push(static_cast<u64>(DisplayResolution::UndockedHeight)); |
| 827 | } | 847 | } |
| 828 | } | 848 | } |
| 829 | 849 | ||