virtual joysticks: move variable decls to top of function (for C90 compat; Bug 5038)

This commit is contained in:
David Ludwig 2020-03-16 17:19:18 -04:00
parent 7379991778
commit 8cd08646bb

View File

@ -343,6 +343,7 @@ static void
VIRTUAL_JoystickUpdate(SDL_Joystick * joystick)
{
joystick_hwdata *hwdata;
int i;
if (!joystick) {
return;
@ -353,13 +354,13 @@ VIRTUAL_JoystickUpdate(SDL_Joystick * joystick)
hwdata = (joystick_hwdata *)joystick->hwdata;
for (int i = 0; i < hwdata->naxes; ++i) {
for (i = 0; i < hwdata->naxes; ++i) {
SDL_PrivateJoystickAxis(joystick, i, hwdata->axes[i]);
}
for (int i = 0; i < hwdata->nbuttons; ++i) {
for (i = 0; i < hwdata->nbuttons; ++i) {
SDL_PrivateJoystickButton(joystick, i, hwdata->buttons[i]);
}
for (int i = 0; i < hwdata->nhats; ++i) {
for (i = 0; i < hwdata->nhats; ++i) {
SDL_PrivateJoystickHat(joystick, i, hwdata->hats[i]);
}
}