src/joystick/darwin/SDL_sysjoystick.c
changeset 9862 c3c3cdaf37f9
parent 9632 6ae6b0b46e78
child 9912 628225876708
--- a/src/joystick/darwin/SDL_sysjoystick.c	Wed Sep 09 19:08:52 2015 -0300
+++ b/src/joystick/darwin/SDL_sysjoystick.c	Sun Sep 13 11:29:45 2015 -0400
@@ -465,6 +465,7 @@
             curdevice = curdevice->pNext;
         }
         curdevice->pNext = device;
+        ++device_index;  /* bump by one since we counted by pNext. */
     }
 
 /* !!! FIXME: why isn't there an SDL_PrivateJoyDeviceAdded()? */