Pad: Only consider LSB for small motor vibration

This commit is contained in:
RedPanda4552 2023-08-19 15:14:40 -04:00 committed by refractionpcsx2
parent dfb967834f
commit e94912cdb9
1 changed files with 5 additions and 2 deletions

View File

@ -166,13 +166,16 @@ u8 PadDualshock2::Poll(u8 commandByte)
break;
}
// Small motor on the controller is only controlled by the LSB.
// Any value can be sent by the software, but only odd numbers
// (LSB set) will turn on the motor.
switch (this->smallMotorLastConfig)
{
case 0x00:
smallMotor = this->vibrationMotors[0];
smallMotor = this->vibrationMotors[0] & 0x01;
break;
case 0x01:
smallMotor = this->vibrationMotors[1];
smallMotor = this->vibrationMotors[1] & 0x01;
break;
default:
break;