Skip to content

Commit

Permalink
emscripten: SDL_PrivateJoystickAdded() wants an instance id, not devi…
Browse files Browse the repository at this point in the history
…ce index.
  • Loading branch information
icculus committed Dec 15, 2018
1 parent e5476c6 commit 1829692
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/joystick/emscripten/SDL_sysjoystick.c
Expand Up @@ -97,7 +97,7 @@ Emscripten_JoyStickConnected(int eventType, const EmscriptenGamepadEvent *gamepa

++numjoysticks;

SDL_PrivateJoystickAdded(numjoysticks - 1);
SDL_PrivateJoystickAdded(item->device_instance);

#ifdef DEBUG_JOYSTICK
SDL_Log("Number of joysticks is %d", numjoysticks);
Expand Down

0 comments on commit 1829692

Please sign in to comment.