emscripten: SDL_PrivateJoystickAdded() wants an instance id, not device index.
authorRyan C. Gordon <icculus@icculus.org>
Sat, 15 Dec 2018 09:57:05 -0500
changeset 124750ae268b6ddf0
parent 12474 6e387413a916
child 12476 11f8bd1899c5
emscripten: SDL_PrivateJoystickAdded() wants an instance id, not device index.
src/joystick/emscripten/SDL_sysjoystick.c
     1.1 --- a/src/joystick/emscripten/SDL_sysjoystick.c	Sat Dec 15 14:50:12 2018 +0100
     1.2 +++ b/src/joystick/emscripten/SDL_sysjoystick.c	Sat Dec 15 09:57:05 2018 -0500
     1.3 @@ -97,7 +97,7 @@
     1.4  
     1.5      ++numjoysticks;
     1.6  
     1.7 -    SDL_PrivateJoystickAdded(numjoysticks - 1);
     1.8 +    SDL_PrivateJoystickAdded(item->device_instance);
     1.9  
    1.10  #ifdef DEBUG_JOYSTICK
    1.11      SDL_Log("Number of joysticks is %d", numjoysticks);