aboutsummaryrefslogtreecommitdiff
path: root/src/hid_core/resource_manager.cpp
diff options
context:
space:
mode:
authorNarr the Reg <juangerman-13@hotmail.com>2024-01-25 23:46:00 -0600
committerNarr the Reg <juangerman-13@hotmail.com>2024-01-25 23:46:46 -0600
commitcc539cac2415af14ab94e5cdb6411c58f0d16407 (patch)
tree0c170b92b72a5be216c2b0e3aafd451feb2bb7f4 /src/hid_core/resource_manager.cpp
parentff084ece75da8b0c4312e1fb3cd55fc8482f0078 (diff)
service: hid: Don't try to vibrate if device isn't initialized
Diffstat (limited to 'src/hid_core/resource_manager.cpp')
-rw-r--r--src/hid_core/resource_manager.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/hid_core/resource_manager.cpp b/src/hid_core/resource_manager.cpp
index ca824b4a32..8ef0df020d 100644
--- a/src/hid_core/resource_manager.cpp
+++ b/src/hid_core/resource_manager.cpp
@@ -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;