diff options
author | Zephyron <zephyron@citron-emu.org> | 2025-02-08 19:39:53 +1000 |
---|---|---|
committer | Zephyron <zephyron@citron-emu.org> | 2025-02-08 19:39:53 +1000 |
commit | cc4819744823ee7ebc0ca41533d2b0b938a72a53 (patch) | |
tree | 32c4282ba3c2e898a66740d212ae7f6fa9512b2b | |
parent | 0010882f366c8eca1fc7d55a604ad4a5be3211cc (diff) |
service/hid: reorganize gesture-related functions
- Move SetGestureOutputRanges function registration to be with other
gesture-related functions (next to ActivateGesture)
- Move SetGestureOutputRanges implementation to be with other
gesture-related implementations
- Change log level from WARNING to DEBUG for SetGestureOutputRanges
- Move function declaration to private section with other IPC handlers
- Update function ordering to match service registration order
These changes improve code organization by grouping related
functionality together and maintain consistency between the
interface registration and implementation ordering.
-rw-r--r-- | src/core/hle/service/hid/hid_server.cpp | 14 | ||||
-rw-r--r-- | src/core/hle/service/hid/hid_server.h | 3 |
2 files changed, 8 insertions, 9 deletions
diff --git a/src/core/hle/service/hid/hid_server.cpp b/src/core/hle/service/hid/hid_server.cpp index 602a5ab52..c12b1b16b 100644 --- a/src/core/hle/service/hid/hid_server.cpp +++ b/src/core/hle/service/hid/hid_server.cpp @@ -89,6 +89,7 @@ IHidServer::IHidServer(Core::System& system_, std::shared_ptr<ResourceManager> r {88, C<&IHidServer::GetSixAxisSensorIcInformation>, "GetSixAxisSensorIcInformation"}, {89, C<&IHidServer::ResetIsSixAxisSensorDeviceNewlyAssigned>, "ResetIsSixAxisSensorDeviceNewlyAssigned"}, {91, C<&IHidServer::ActivateGesture>, "ActivateGesture"}, + {92, C<&IHidServer::SetGestureOutputRanges>, "SetGestureOutputRanges"}, {100, C<&IHidServer::SetSupportedNpadStyleSet>, "SetSupportedNpadStyleSet"}, {101, C<&IHidServer::GetSupportedNpadStyleSet>, "GetSupportedNpadStyleSet"}, {102, C<&IHidServer::SetSupportedNpadIdType>, "SetSupportedNpadIdType"}, @@ -184,7 +185,6 @@ IHidServer::IHidServer(Core::System& system_, std::shared_ptr<ResourceManager> r {1003, C<&IHidServer::IsFirmwareUpdateNeededForNotification>, "IsFirmwareUpdateNeededForNotification"}, {1004, C<&IHidServer::SetTouchScreenResolution>, "SetTouchScreenResolution"}, {2000, nullptr, "ActivateDigitizer"}, - {92, C<&IHidServer::SetGestureOutputRanges>, "SetGestureOutputRanges"}, }; // clang-format on @@ -577,6 +577,12 @@ Result IHidServer::ActivateGesture(u32 basic_gesture_id, ClientAppletResourceUse R_RETURN(GetResourceManager()->GetGesture()->Activate(aruid.pid, basic_gesture_id)); } +Result IHidServer::SetGestureOutputRanges(u32 param1, u32 param2, u32 param3, u32 param4) { + LOG_DEBUG(Service_HID, "SetGestureOutputRanges called with params: {}, {}, {}, {}", param1, param2, param3, param4); + // REF: https://switchbrew.org/wiki/HID_services , Undocumented. 92 [18.0.0+] SetGestureOutputRanges + R_SUCCEED(); +} + Result IHidServer::SetSupportedNpadStyleSet(Core::HID::NpadStyleSet supported_style_set, ClientAppletResourceUserId aruid) { LOG_DEBUG(Service_HID, "called, supported_style_set={}, applet_resource_user_id={}", @@ -1437,10 +1443,4 @@ std::shared_ptr<ResourceManager> IHidServer::GetResourceManager() { return resource_manager; } -Result IHidServer::SetGestureOutputRanges(u32 param1, u32 param2, u32 param3, u32 param4) { - LOG_WARNING(Service_HID, "SetGestureOutputRanges called with params: {}, {}, {}, {}", param1, param2, param3, param4); - // REF: https://switchbrew.org/wiki/HID_services , Undocumented. 92 [18.0.0+] SetGestureOutputRanges - R_SUCCEED(); -} - } // namespace Service::HID diff --git a/src/core/hle/service/hid/hid_server.h b/src/core/hle/service/hid/hid_server.h index 437c5bd9a..477b35ff0 100644 --- a/src/core/hle/service/hid/hid_server.h +++ b/src/core/hle/service/hid/hid_server.h @@ -31,8 +31,6 @@ public: std::shared_ptr<ResourceManager> GetResourceManager(); - Result SetGestureOutputRanges(u32, u32, u32, u32); - private: Result CreateAppletResource(OutInterface<IAppletResource> out_applet_resource, ClientAppletResourceUserId aruid); @@ -106,6 +104,7 @@ private: Result ResetIsSixAxisSensorDeviceNewlyAssigned(Core::HID::SixAxisSensorHandle sixaxis_handle, ClientAppletResourceUserId aruid); Result ActivateGesture(u32 basic_gesture_id, ClientAppletResourceUserId aruid); + Result SetGestureOutputRanges(u32, u32, u32, u32); Result SetSupportedNpadStyleSet(Core::HID::NpadStyleSet supported_style_set, ClientAppletResourceUserId aruid); Result GetSupportedNpadStyleSet(Out<Core::HID::NpadStyleSet> out_supported_style_set, |