Skip to content
Permalink
Browse files

Mac: Fixed off-by-one bug when plugging in a joystick (thanks, Konsta…

…ntin!).
  • Loading branch information
icculus committed Sep 13, 2015
1 parent 82c8825 commit 4295a6fe47916a841988e09d668dc589b939abb3
Showing with 1 addition and 0 deletions.
  1. +1 −0 src/joystick/darwin/SDL_sysjoystick.c
@@ -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()? */

0 comments on commit 4295a6f

Please sign in to comment.