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:
parent
e9e42fbba5
commit
99b0a681b7
12
DllMain.cpp
12
DllMain.cpp
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user