npad: Disable vibration check if disabled

This commit is contained in:
german77 2021-07-10 20:06:07 -05:00
parent 7dca756f30
commit ed5f1a45b7

View file

@ -941,6 +941,11 @@ void Controller_NPad::InitializeVibrationDevice(const DeviceHandle& vibration_de
void Controller_NPad::InitializeVibrationDeviceAtIndex(std::size_t npad_index,
std::size_t device_index) {
if (!Settings::values.vibration_enabled.GetValue()) {
vibration_devices_mounted[npad_index][device_index] = false;
return;
}
if (vibrations[npad_index][device_index]) {
vibration_devices_mounted[npad_index][device_index] =
vibrations[npad_index][device_index]->GetStatus() == 1;