Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Emscripten: Fixed sending SDL_JOYDEVICEADDED events with an index out…
… of range. SDL_JOYDEVICEADDED events must contain the device index which is a value between 0 and the number of connected joysticks. The old implementation included a value based on the instance id instead. It worked in some cases because the values are similar initially. But after disconnecting joysticks this is no more the case and the always increasing instance id becomes larger than number of joysticks.
- Loading branch information