diff options
| author | 2020-11-28 23:20:23 -0800 | |
|---|---|---|
| committer | 2020-11-28 23:20:23 -0800 | |
| commit | 6750b4d3afb2a3bdcd4b1021be3f1367e9170627 (patch) | |
| tree | e380c6dbc9352674551b19ddee8248c4d9de3209 /src/core | |
| parent | Merge pull request #5034 from german77/communicationModeFix (diff) | |
| parent | hid: Check if applet_resource exists in InitializeVibrationDevice (diff) | |
| download | yuzu-6750b4d3afb2a3bdcd4b1021be3f1367e9170627.tar.gz yuzu-6750b4d3afb2a3bdcd4b1021be3f1367e9170627.tar.xz yuzu-6750b4d3afb2a3bdcd4b1021be3f1367e9170627.zip | |
Merge pull request #4998 from Morph1984/bioshock-patch
hid: Check if applet_resource exists in InitializeVibrationDevice
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/hle/service/hid/hid.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp index a1d307a41..b3c7234e1 100644 --- a/src/core/hle/service/hid/hid.cpp +++ b/src/core/hle/service/hid/hid.cpp | |||
| @@ -157,8 +157,10 @@ private: | |||
| 157 | IPC::RequestParser rp{ctx}; | 157 | IPC::RequestParser rp{ctx}; |
| 158 | const auto vibration_device_handle{rp.PopRaw<Controller_NPad::DeviceHandle>()}; | 158 | const auto vibration_device_handle{rp.PopRaw<Controller_NPad::DeviceHandle>()}; |
| 159 | 159 | ||
| 160 | applet_resource->GetController<Controller_NPad>(HidController::NPad) | 160 | if (applet_resource != nullptr) { |
| 161 | .InitializeVibrationDevice(vibration_device_handle); | 161 | applet_resource->GetController<Controller_NPad>(HidController::NPad) |
| 162 | .InitializeVibrationDevice(vibration_device_handle); | ||
| 163 | } | ||
| 162 | 164 | ||
| 163 | LOG_DEBUG(Service_HID, "called, npad_type={}, npad_id={}, device_index={}", | 165 | LOG_DEBUG(Service_HID, "called, npad_type={}, npad_id={}, device_index={}", |
| 164 | vibration_device_handle.npad_type, vibration_device_handle.npad_id, | 166 | vibration_device_handle.npad_type, vibration_device_handle.npad_id, |