Navigation Menu

Skip to content

Commit

Permalink
virtual joysticks: move variable decls to top of function (for C90 co…
Browse files Browse the repository at this point in the history
…mpat; Bug 5038)
  • Loading branch information
DavidLudwig committed Mar 16, 2020
1 parent 7379991 commit 8cd0864
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/joystick/virtual/SDL_virtualjoystick.c
Expand Up @@ -343,6 +343,7 @@ static void
VIRTUAL_JoystickUpdate(SDL_Joystick * joystick)
{
joystick_hwdata *hwdata;
int i;

if (!joystick) {
return;
Expand All @@ -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]);
}
}
Expand Down

0 comments on commit 8cd0864

Please sign in to comment.