Ryzee119 / ogx360

Add modern xinput USB support to your Original Xbox :tv: :video_game:
406 stars 62 forks source link

Rumble fix for Steel Battalion #49

Closed phantom-8 closed 3 years ago

phantom-8 commented 3 years ago

For Steel Battalion controller emulation, rumble motors sometimes don't stop. The problem is the following code only check for non-zero values in LED feedback data. When the LED values hit zero, all these code will be skipped and the rumble motor will never turn off. Most of time, it's not a problem 'cos the LED values normally become small, such as 0x01 and this value is small enough to not turn on the motor. However, sometimes the LED values goes from 0x03 or above directly to 0x00 and the motor will never turn off.

https://github.com/Ryzee119/ogx360/blob/23d41be66c4cced16f3415cca0018c9d64b26a04/Firmware/src/main.cpp#L322-L353

Ryzee119 commented 3 years ago

Awesome thank you!