mirror of
https://github.com/Ryujinx/SDL.git
synced 2024-12-23 02:45:36 +00:00
0c85173d5b
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 (cherry picked from commit 07cb7c10a15b95387431bcb3a1ae77cfd432707b) |
||
---|---|---|
.github | ||
acinclude | ||
android-project | ||
android-project-ant | ||
build-scripts | ||
cmake | ||
docs | ||
include | ||
mingw/pkg-support/cmake | ||
src | ||
test | ||
VisualC | ||
VisualC-GDK | ||
VisualC-WinRT | ||
visualtest | ||
wayland-protocols | ||
Xcode | ||
Xcode-iOS/Demos | ||
.clang-format | ||
.editorconfig | ||
.gitignore | ||
.wikiheaders-options | ||
Android.mk | ||
autogen.sh | ||
BUGS.txt | ||
cmake_uninstall.cmake.in | ||
CMakeLists.txt | ||
configure | ||
configure.ac | ||
CREDITS.txt | ||
INSTALL.txt | ||
LICENSE.txt | ||
Makefile.in | ||
Makefile.minimal | ||
Makefile.os2 | ||
Makefile.pandora | ||
Makefile.w32 | ||
README-SDL.txt | ||
README.md | ||
sdl2-config-version.cmake.in | ||
sdl2-config.cmake.in | ||
sdl2-config.in | ||
sdl2.m4 | ||
sdl2.pc.in | ||
SDL2.spec.in | ||
SDL2Config.cmake.in | ||
TODO.txt | ||
WhatsNew.txt |
Simple DirectMedia Layer (SDL) Version 2.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
Enjoy!
Sam Lantinga (slouken@libsdl.org)