Simple DirectMedia Layer https://libsdl.org
Find a file
Tyson Whitehead 53ade19430 udev: Fix O(n^2) device walking issue (closes #9092)
I believe there was a O(n^2) device walking issues on startup

- MaybeAddDevice gets called for every device at startup
- MaybeAddDevice calls IsJoystick
- IsJoystick calls SDL_UDEV_GetProductInfo
- SDL_UDEV_GetProductInfo calls udev_enumerate_scan_devices
- udev_enumerate_scan_devices walks all the devices

Prior to commit 3b1e0e1 this was mostly masked as IsJoystick only
called SDL_UDEV_GetProductInfo when a JSIOCGNAME ioctl was
successful. This fixes the O(n^2) behaviour by directly getting
the device via udev_device_new_from_devnum (based on type, major,
and minor number) instead of enumerating everything via
udev_enumerate_scan_devices and matching on name.
2024-03-25 06:45:01 -07:00
.github dmg: fix SDL_version.h issue in sdl3-config-version.cmake 2024-03-24 20:15:42 +01:00
android-project Updated to version 3.1.0 for the preview release 2024-03-24 06:16:02 -07:00
build-scripts Added a script to trigger the release workflow 2024-03-24 07:22:58 -07:00
cmake cmake: build tests against installed SDL prefix 2024-03-23 21:41:20 +01:00
docs Remove legacy SDL2 input grab API 2024-03-24 16:53:23 -07:00
include Remove legacy SDL2 input grab API 2024-03-24 16:53:23 -07:00
mingw/pkg-support mingw: add pkg-support files (INSTALL.txt and Makefile) 2024-03-23 21:41:20 +01:00
src udev: Fix O(n^2) device walking issue (closes #9092) 2024-03-25 06:45:01 -07:00
test Remove legacy SDL2 input grab API 2024-03-24 16:53:23 -07:00
VisualC cpuinfo: reset cpu features on SDL_Quit 2024-03-23 16:36:44 -07:00
VisualC-GDK Revert "Added virtual keyboard support for Xbox (thanks @ts-13512)" 2024-03-23 16:47:59 -07:00
VisualC-WinRT cpuinfo: reset cpu features on SDL_Quit 2024-03-23 16:36:44 -07:00
wayland-protocols wayland: Add the xdg-foreign-unstable-v2 protocol 2024-03-15 18:30:05 -04:00
Xcode dmg: fix SDL_version.h issue in sdl3-config-version.cmake 2024-03-24 20:15:42 +01:00
.clang-format Add 'wl_list_for_each_safe' to the clang-format macro list 2024-03-14 10:22:23 -04:00
.clang-tidy Fix size of memcpy in SDL_AudioDeviceFormatChangedAlreadyLocked 2023-08-05 14:14:45 -04:00
.editorconfig Fixed formatting for Haiku cc files 2023-01-25 03:03:41 -08:00
.gitignore GDK: Remove old shader sources, unify shader compilation .bats 2024-03-02 10:30:29 -08:00
.wikiheaders-options sdlwiki: SDL3 advises users to include through 'SDL3/SDL.h' 2023-03-21 02:19:19 +01:00
Android.mk Add time and realtime clock functions 2024-03-19 10:57:36 -07:00
BUGS.txt Cleaned up a few more Bugzilla mentions. 2021-02-12 14:46:49 -05:00
CMakeLists.txt Updated to version 3.1.0 for the preview release 2024-03-24 06:16:02 -07:00
CREDITS.md docs: Moved CREDITS and INSTALL to markdown format. 2023-11-29 12:31:27 -05:00
INSTALL.md docs: Moved CREDITS and INSTALL to markdown format. 2023-11-29 12:31:27 -05:00
LICENSE.txt Updated copyright for 2024 2024-01-01 13:15:26 -08:00
README-SDL.txt More HTTPS changes in the documentation. 2017-02-16 16:52:03 -05:00
README.md Tweaking documentation for the SDL 3.0 preview release 2024-03-24 06:16:02 -07:00
WhatsNew.txt Tweaking documentation for the SDL 3.0 preview release 2024-03-24 06:16:02 -07:00

Simple DirectMedia Layer (SDL) Version 3.0

https://www.libsdl.org/

Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware. 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)