07cb7c10a1
Emscripten was using its own, private integer in order to allocate new SDL_JoystickIDs. SDL keeps a similar integer for allocating joystick-ids, one which is shared across multiple joystick backends. SDL 2.0.13 introduces a new joystick-backend, a Virtual joystick backend, which allows for software-driven joysticks, and which is designed to sit alongside joystick-backends that provide access to physical joysticks. The Emscripten and the Virtual backends were, at times, getting allocated the same SDL_JoystickIDs, if and when both backends were used simultaneously. This could happen if, for example, an application was using a virtual joystick in order to drive a touch-screen based joystick, while also supporting physical joysticks through the Emscripten backend. When two joysticks end up with the same SDL_JoystickID, conflicts can occur. For example, disconnecting a physical joystick with the same SDL_JoystickID as a virtual one, can lead to the virtual joystick being closed, inadvertently. This fix makes the Emscripten backend use SDL's cross-joystick-backend integer counter, which is shared among joystick backends, for allocating new SDL_JoystickIDs, rather than a private, Emscripten-specific counter. Fixes https://github.com/libsdl-org/SDL/issues/3647 |
||
---|---|---|
.github | ||
VisualC | ||
VisualC-GDK | ||
VisualC-WinRT | ||
Xcode | ||
android-project | ||
build-scripts | ||
cmake | ||
docs | ||
include | ||
mingw/pkg-support/cmake | ||
src | ||
test | ||
wayland-protocols | ||
.clang-format | ||
.clang-tidy | ||
.editorconfig | ||
.gitignore | ||
.wikiheaders-options | ||
Android.mk | ||
BUGS.txt | ||
CMakeLists.txt | ||
CREDITS.txt | ||
INSTALL.txt | ||
LICENSE.txt | ||
README-SDL.txt | ||
README.md | ||
TODO.txt | ||
WhatsNew.txt |
README.md
Simple DirectMedia Layer (SDL) Version 3.0
Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D. It is used by video playback software, emulators, and popular games including Valve's award winning catalog and many Humble Bundle games.
More extensive documentation is available in the docs directory, starting with README.md. If you are migrating to SDL 3.0 from SDL 2.0, the changes are extensively documented in README-migration.md.
Enjoy!
Sam Lantinga (slouken@libsdl.org)