emscripten: SDL_PrivateJoystickAdded() wants an instance id, not device index.

This commit is contained in:
Ryan C. Gordon 2018-12-15 09:57:05 -05:00
parent e5476c653d
commit 1829692753
1 changed files with 1 additions and 1 deletions

View File

@ -97,7 +97,7 @@ Emscripten_JoyStickConnected(int eventType, const EmscriptenGamepadEvent *gamepa
++numjoysticks; ++numjoysticks;
SDL_PrivateJoystickAdded(numjoysticks - 1); SDL_PrivateJoystickAdded(item->device_instance);
#ifdef DEBUG_JOYSTICK #ifdef DEBUG_JOYSTICK
SDL_Log("Number of joysticks is %d", numjoysticks); SDL_Log("Number of joysticks is %d", numjoysticks);