From c265348cf816033ae8c4aeed6d6cbb76d527471a Mon Sep 17 00:00:00 2001 From: torcs-ng Date: Sun, 9 Jan 2022 16:58:03 +0000 Subject: [PATCH] - 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 --- src/libs/tgfclient/control.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/libs/tgfclient/control.cpp b/src/libs/tgfclient/control.cpp index 5e73e478e..82e28c596 100644 --- a/src/libs/tgfclient/control.cpp +++ b/src/libs/tgfclient/control.cpp @@ -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