diff options
author | FrozenAra <macjordan02@googlemail.com> | 2023-11-27 19:26:06 +0100 |
---|---|---|
committer | FrozenAra <macjordan02@googlemail.com> | 2023-11-27 20:01:30 +0100 |
commit | e21f96ffde30d66337bd119c04a13f1025be159c (patch) | |
tree | 7a50d39041cde8bb3d74e8130a905c8f75d89702 /src/core/hle/service/hid/hid_server.cpp | |
parent | Merge pull request #12183 from german77/justmii (diff) | |
download | yuzu-e21f96ffde30d66337bd119c04a13f1025be159c.tar yuzu-e21f96ffde30d66337bd119c04a13f1025be159c.tar.gz yuzu-e21f96ffde30d66337bd119c04a13f1025be159c.tar.bz2 yuzu-e21f96ffde30d66337bd119c04a13f1025be159c.tar.lz yuzu-e21f96ffde30d66337bd119c04a13f1025be159c.tar.xz yuzu-e21f96ffde30d66337bd119c04a13f1025be159c.tar.zst yuzu-e21f96ffde30d66337bd119c04a13f1025be159c.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/hid/hid_server.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/core/hle/service/hid/hid_server.cpp b/src/core/hle/service/hid/hid_server.cpp index 583142e35..a7d1578d9 100644 --- a/src/core/hle/service/hid/hid_server.cpp +++ b/src/core/hle/service/hid/hid_server.cpp @@ -208,6 +208,7 @@ IHidServer::IHidServer(Core::System& system_, std::shared_ptr<ResourceManager> r {1001, &IHidServer::GetNpadCommunicationMode, "GetNpadCommunicationMode"}, {1002, &IHidServer::SetTouchScreenConfiguration, "SetTouchScreenConfiguration"}, {1003, &IHidServer::IsFirmwareUpdateNeededForNotification, "IsFirmwareUpdateNeededForNotification"}, + {1004, &IHidServer::SetTouchScreenResolution, "SetTouchScreenResolution"}, {2000, nullptr, "ActivateDigitizer"}, }; // clang-format on @@ -2363,6 +2364,21 @@ void IHidServer::IsFirmwareUpdateNeededForNotification(HLERequestContext& ctx) { rb.Push(false); } +void IHidServer::SetTouchScreenResolution(HLERequestContext& ctx) { + IPC::RequestParser rp{ctx}; + const auto width{rp.Pop<u32>()}; + const auto height{rp.Pop<u32>()}; + const auto applet_resource_user_id{rp.Pop<u64>()}; + + GetResourceManager()->GetTouchScreen()->SetTouchscreenDimensions(width, height); + + LOG_INFO(Service_HID, "called, width={}, height={}, applet_resource_user_id={}", width, height, + applet_resource_user_id); + + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(ResultSuccess); +} + std::shared_ptr<ResourceManager> IHidServer::GetResourceManager() { resource_manager->Initialize(); return resource_manager; |