1
0
mirror of synced 2025-02-17 18:59:24 +01:00

Fix issue where Rumble would slow down and crash games etc

If used on unsupported device eg Wheel

now Rumble will automatically disable if its unsupported
This commit is contained in:
Aaron M 2019-11-02 01:49:29 +13:00
parent e9e42fbba5
commit 99b0a681b7

View File

@ -1580,11 +1580,19 @@ void TriggerRumbleEffect(double lowfrequency, double highfrequency, double lengt
if (ReverseRumble == 1)
{
SDL_JoystickRumble(GameController, HighMotor, LowMotor, length);
int ReverseRumble = SDL_JoystickRumble(GameController, HighMotor, LowMotor, length);
if (ReverseRumble == -1)
{
EnableRumble = 0;
}
}
else
{
SDL_JoystickRumble(GameController, LowMotor, HighMotor, length);
int Rumble = SDL_JoystickRumble(GameController, LowMotor, HighMotor, length);
if (Rumble == -1)
{
EnableRumble = 0;
}
}
}
}