service: hid: Implement GetPlayerLedPattern accurately
This commit is contained in:
parent
ba4cee1812
commit
a0f7f2b309
5 changed files with 41 additions and 27 deletions
|
@ -956,17 +956,6 @@ Result NPad::SwapNpadAssignment(u64 aruid, Core::HID::NpadIdType npad_id_1,
|
|||
return ResultSuccess;
|
||||
}
|
||||
|
||||
Result NPad::GetLedPattern(Core::HID::NpadIdType npad_id, Core::HID::LedPattern& pattern) const {
|
||||
if (!IsNpadIdValid(npad_id)) {
|
||||
LOG_ERROR(Service_HID, "Invalid NpadIdType npad_id:{}", npad_id);
|
||||
return ResultInvalidNpadId;
|
||||
}
|
||||
const auto aruid = applet_resource_holder.applet_resource->GetActiveAruid();
|
||||
const auto& controller = GetControllerFromNpadIdType(aruid, npad_id).device;
|
||||
pattern = controller->GetLedPattern();
|
||||
return ResultSuccess;
|
||||
}
|
||||
|
||||
Result NPad::IsUnintendedHomeButtonInputProtectionEnabled(bool& out_is_enabled, u64 aruid,
|
||||
Core::HID::NpadIdType npad_id) const {
|
||||
std::scoped_lock lock{mutex};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue