service: hid: Don't try to vibrate if device isn't initialized

This commit is contained in:
Narr the Reg
2024-01-25 23:46:00 -06:00
parent e04368ad7c
commit f2012e5aff
3 changed files with 9 additions and 0 deletions

View File

@ -373,6 +373,10 @@ Result ResourceManager::SendVibrationValue(u64 aruid,
device = GetNSVibrationDevice(handle);
}
if (device != nullptr) {
// Prevent sending vibrations to an inactive vibration handle
if (!device->IsActive()) {
return ResultSuccess;
}
result = device->SendVibrationValue(value);
}
return result;