Some games regulate the rumble duration by emitting a new rumble event with magnitude 0 to stop the rumble. In these games, the duration is always set to a high value, because the assumption is that the rumble will be explicitly stopped when needed. With the way the code was built before, this would lead to de facto infinite rumble.
This PR makes the driver read out the magnitude value and stops the rumbling if the magnitude is set to 0. This fixes the infinite rumble issue in various games. Games that suffered from this issue and are now confirmed to be fixed are (but I suspect there are quite a few more):
Broforce
GRID (via Proton)
Unrailed!
Note that this still isn't optimal for some of those games. Many games that regulate the magnitude frequently use low intensity rumble. However currently all rumble will be intensified to maximum intensity rumble, because the driver is only able to turn rumble on or off and cannot regulate magnitude. One game where this is an issue is GRID. Here, the game will full-intensity rumble almost all the time while the car is driving. Maybe there's something that could be done about this in the future. Still, the situation with this patch is better, because at least rumbling will stop when there's absolutely no rumble being emitted by the game.
Some games regulate the rumble duration by emitting a new rumble event with magnitude 0 to stop the rumble. In these games, the duration is always set to a high value, because the assumption is that the rumble will be explicitly stopped when needed. With the way the code was built before, this would lead to de facto infinite rumble.
This PR makes the driver read out the magnitude value and stops the rumbling if the magnitude is set to 0. This fixes the infinite rumble issue in various games. Games that suffered from this issue and are now confirmed to be fixed are (but I suspect there are quite a few more):
Note that this still isn't optimal for some of those games. Many games that regulate the magnitude frequently use low intensity rumble. However currently all rumble will be intensified to maximum intensity rumble, because the driver is only able to turn rumble on or off and cannot regulate magnitude. One game where this is an issue is GRID. Here, the game will full-intensity rumble almost all the time while the car is driving. Maybe there's something that could be done about this in the future. Still, the situation with this patch is better, because at least rumbling will stop when there's absolutely no rumble being emitted by the game.