Skip to content

Commit

Permalink
Don't try to update axis value or button state for unconnected joysti…
Browse files Browse the repository at this point in the history
…ck(s).
  • Loading branch information
jmbau committed Jul 28, 2024
1 parent a5f07da commit aff6101
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/gctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,9 @@ void GCtlUpdate(
continue;

sdljoystick = gc->sdljoystick[i];
if(sdljoystick == NULL)
continue;

/* Update defined joystick operations for this joystick.
* This is to tabulate a list of functions that were
* handled/controlled by any of the joystick(s) so the
Expand Down

0 comments on commit aff6101

Please sign in to comment.