Skip to content

Commit

Permalink
Mac: Fixed off-by-one bug when plugging in a joystick (thanks, Konsta…
Browse files Browse the repository at this point in the history
…ntin!).
  • Loading branch information
icculus committed Sep 13, 2015
1 parent 82c8825 commit 4295a6f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/joystick/darwin/SDL_sysjoystick.c
Expand Up @@ -465,6 +465,7 @@ JoystickDeviceWasAddedCallback(void *ctx, IOReturn res, void *sender, IOHIDDevic
curdevice = curdevice->pNext;
}
curdevice->pNext = device;
++device_index; /* bump by one since we counted by pNext. */
}

/* !!! FIXME: why isn't there an SDL_PrivateJoyDeviceAdded()? */
Expand Down

0 comments on commit 4295a6f

Please sign in to comment.