diff options
Diffstat (limited to 'src/hid_core')
| -rw-r--r-- | src/hid_core/hid_types.h | 5 | ||||
| -rw-r--r-- | src/hid_core/resources/npad/npad.cpp | 11 | ||||
| -rw-r--r-- | src/hid_core/resources/npad/npad.h | 2 |
3 files changed, 4 insertions, 14 deletions
diff --git a/src/hid_core/hid_types.h b/src/hid_core/hid_types.h index b310ab72d..ffb5f1926 100644 --- a/src/hid_core/hid_types.h +++ b/src/hid_core/hid_types.h | |||
| @@ -422,7 +422,10 @@ struct NpadPowerInfo { | |||
| 422 | static_assert(sizeof(NpadPowerInfo) == 0xC, "NpadPowerInfo is an invalid size"); | 422 | static_assert(sizeof(NpadPowerInfo) == 0xC, "NpadPowerInfo is an invalid size"); |
| 423 | 423 | ||
| 424 | struct LedPattern { | 424 | struct LedPattern { |
| 425 | explicit LedPattern(u64 light1, u64 light2, u64 light3, u64 light4) { | 425 | LedPattern() { |
| 426 | raw = 0; | ||
| 427 | } | ||
| 428 | LedPattern(u64 light1, u64 light2, u64 light3, u64 light4) { | ||
| 426 | position1.Assign(light1); | 429 | position1.Assign(light1); |
| 427 | position2.Assign(light2); | 430 | position2.Assign(light2); |
| 428 | position3.Assign(light3); | 431 | position3.Assign(light3); |
diff --git a/src/hid_core/resources/npad/npad.cpp b/src/hid_core/resources/npad/npad.cpp index cde84b1bb..2823be348 100644 --- a/src/hid_core/resources/npad/npad.cpp +++ b/src/hid_core/resources/npad/npad.cpp | |||
| @@ -956,17 +956,6 @@ Result NPad::SwapNpadAssignment(u64 aruid, Core::HID::NpadIdType npad_id_1, | |||
| 956 | return ResultSuccess; | 956 | return ResultSuccess; |
| 957 | } | 957 | } |
| 958 | 958 | ||
| 959 | Result NPad::GetLedPattern(Core::HID::NpadIdType npad_id, Core::HID::LedPattern& pattern) const { | ||
| 960 | if (!IsNpadIdValid(npad_id)) { | ||
| 961 | LOG_ERROR(Service_HID, "Invalid NpadIdType npad_id:{}", npad_id); | ||
| 962 | return ResultInvalidNpadId; | ||
| 963 | } | ||
| 964 | const auto aruid = applet_resource_holder.applet_resource->GetActiveAruid(); | ||
| 965 | const auto& controller = GetControllerFromNpadIdType(aruid, npad_id).device; | ||
| 966 | pattern = controller->GetLedPattern(); | ||
| 967 | return ResultSuccess; | ||
| 968 | } | ||
| 969 | |||
| 970 | Result NPad::IsUnintendedHomeButtonInputProtectionEnabled(bool& out_is_enabled, u64 aruid, | 959 | Result NPad::IsUnintendedHomeButtonInputProtectionEnabled(bool& out_is_enabled, u64 aruid, |
| 971 | Core::HID::NpadIdType npad_id) const { | 960 | Core::HID::NpadIdType npad_id) const { |
| 972 | std::scoped_lock lock{mutex}; | 961 | std::scoped_lock lock{mutex}; |
diff --git a/src/hid_core/resources/npad/npad.h b/src/hid_core/resources/npad/npad.h index 502cb9b55..3b1a69e7f 100644 --- a/src/hid_core/resources/npad/npad.h +++ b/src/hid_core/resources/npad/npad.h | |||
| @@ -97,8 +97,6 @@ public: | |||
| 97 | Result ResetIsSixAxisSensorDeviceNewlyAssigned( | 97 | Result ResetIsSixAxisSensorDeviceNewlyAssigned( |
| 98 | u64 aruid, const Core::HID::SixAxisSensorHandle& sixaxis_handle); | 98 | u64 aruid, const Core::HID::SixAxisSensorHandle& sixaxis_handle); |
| 99 | 99 | ||
| 100 | Result GetLedPattern(Core::HID::NpadIdType npad_id, Core::HID::LedPattern& pattern) const; | ||
| 101 | |||
| 102 | Result IsUnintendedHomeButtonInputProtectionEnabled(bool& out_is_enabled, u64 aruid, | 100 | Result IsUnintendedHomeButtonInputProtectionEnabled(bool& out_is_enabled, u64 aruid, |
| 103 | Core::HID::NpadIdType npad_id) const; | 101 | Core::HID::NpadIdType npad_id) const; |
| 104 | Result EnableUnintendedHomeButtonInputProtection(u64 aruid, Core::HID::NpadIdType npad_id, | 102 | Result EnableUnintendedHomeButtonInputProtection(u64 aruid, Core::HID::NpadIdType npad_id, |