- ix warning on control.cpp

git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@7892 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: d20ee3e0c39ea8604a49d1446b22e6f14647fc04
Former-commit-id: 7d8b0a42471761114dceb06d45f3f1243ce6cedb
This commit is contained in:
torcs-ng 2022-01-09 16:58:03 +00:00
parent 79a66e06fd
commit c265348cf8

View file

@ -379,15 +379,21 @@ void
gfctrlJoyShutdown(void)
{
if (gfctrlJoyPresent != GFCTRL_JOY_UNTESTED)
for (int index = 0; index < gfctrlJoyPresent; index++) {
{
for (int index = 0; index < gfctrlJoyPresent; index++)
{
SDL_JoystickClose(Joysticks[index]);
Joysticks[index] = NULL;
if (Haptics[index]) {
if (Haptics[index])
{
SDL_HapticClose(Haptics[index]);
Haptics[index] = NULL;
}
}
gfctrlJoyPresent = GFCTRL_JOY_UNTESTED;
}
}
/** Create the joystick control