diff options
Diffstat (limited to 'src/hid_core/resources/npad')
-rw-r--r-- | src/hid_core/resources/npad/npad.cpp | 5 | ||||
-rw-r--r-- | src/hid_core/resources/npad/npad_resource.cpp | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/hid_core/resources/npad/npad.cpp b/src/hid_core/resources/npad/npad.cpp index e6c035628..97f31d26e 100644 --- a/src/hid_core/resources/npad/npad.cpp +++ b/src/hid_core/resources/npad/npad.cpp @@ -870,6 +870,11 @@ void NPad::InitializeVibrationDevice( const auto aruid = applet_resource_holder.applet_resource->GetActiveAruid(); const auto npad_index = static_cast<Core::HID::NpadIdType>(vibration_device_handle.npad_id); const auto device_index = static_cast<std::size_t>(vibration_device_handle.device_index); + + if (aruid == 0) { + return; + } + InitializeVibrationDeviceAtIndex(aruid, npad_index, device_index); } diff --git a/src/hid_core/resources/npad/npad_resource.cpp b/src/hid_core/resources/npad/npad_resource.cpp index b0255a05c..ea9fc14ed 100644 --- a/src/hid_core/resources/npad/npad_resource.cpp +++ b/src/hid_core/resources/npad/npad_resource.cpp @@ -46,7 +46,9 @@ Result NPadResource::RegisterAppletResourceUserId(u64 aruid) { data_index = i; break; } - if (registration_list.flag[i] == RegistrationStatus::None) { + // TODO: Don't Handle pending delete here + if (registration_list.flag[i] == RegistrationStatus::None || + registration_list.flag[i] == RegistrationStatus::PendingDelete) { data_index = i; break; } |