summaryrefslogtreecommitdiffstats
path: root/src/core/hle
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2020-10-08 14:18:50 +0200
committerMorph <39850852+Morph1984@users.noreply.github.com>2020-11-16 05:33:20 +0100
commite02ef3c3bed2f8e98ec9481cdea1a6253c34e9d1 (patch)
treeba4f5aa2271139b0842751b86ee18fd083b542b5 /src/core/hle
parenthid: Fix controller rumble based on new research (diff)
downloadyuzu-e02ef3c3bed2f8e98ec9481cdea1a6253c34e9d1.tar
yuzu-e02ef3c3bed2f8e98ec9481cdea1a6253c34e9d1.tar.gz
yuzu-e02ef3c3bed2f8e98ec9481cdea1a6253c34e9d1.tar.bz2
yuzu-e02ef3c3bed2f8e98ec9481cdea1a6253c34e9d1.tar.lz
yuzu-e02ef3c3bed2f8e98ec9481cdea1a6253c34e9d1.tar.xz
yuzu-e02ef3c3bed2f8e98ec9481cdea1a6253c34e9d1.tar.zst
yuzu-e02ef3c3bed2f8e98ec9481cdea1a6253c34e9d1.zip
Diffstat (limited to 'src/core/hle')
-rw-r--r--src/core/hle/service/hid/controllers/npad.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/core/hle/service/hid/controllers/npad.cpp b/src/core/hle/service/hid/controllers/npad.cpp
index 8a5e5abcf..f865e3f5f 100644
--- a/src/core/hle/service/hid/controllers/npad.cpp
+++ b/src/core/hle/service/hid/controllers/npad.cpp
@@ -688,6 +688,16 @@ void Controller_NPad::VibrateController(const std::vector<DeviceHandle>& vibrati
continue;
}
+ // Some games try to send mismatched parameters in the device handle, block these.
+ if ((connected_controllers[npad_index].type == NPadControllerType::JoyLeft &&
+ (vibration_device_handles[i].npad_type == NpadType::JoyconRight ||
+ vibration_device_handles[i].device_index == DeviceIndex::Right)) ||
+ (connected_controllers[npad_index].type == NPadControllerType::JoyRight &&
+ (vibration_device_handles[i].npad_type == NpadType::JoyconLeft ||
+ vibration_device_handles[i].device_index == DeviceIndex::Left))) {
+ continue;
+ }
+
using namespace Settings::NativeButton;
const auto& button_state = buttons[npad_index];