12570 Commits
Author SHA1 Message Date
Shane Calimlim a2e7c76bda emscripten: add main thread proxy for getting audio frequency
the rest of the calls were updated in aec86ba but one was missed
2026-07-28 15:52:53 -04:00
Thorbjørn Lindeijer 50b04b2813 Fixed some typos in the audio hints documentation 2026-07-27 17:02:43 -04:00
Ryan C. Gordon 76847b46be alsa: Don't crash when SDL_GetDefaultAudioInfo() is passed a NULL name.
Fixes #16011.
2026-07-17 14:30:19 -04:00
Anonymous Maarten 86a636852b ci: don't configure cmake with -Werror 2026-07-16 04:15:11 +02:00
Sam Clegg f6a328a14b [emscripten] Remove support for legacy webkitGetUserMedia
This modern navigator.mediaDevices.getUserMedia has been
available since Chrome 53 / Firefox 38 / Safari 11.

See https://github.com/emscripten-core/emscripten/pull/27347
2026-07-14 12:32:23 -07:00
Ryan C. Gordon 73fed37c04 assert: make disabled asserts work with bitfield conditions.
We don't care _what_ the `sizeof` results are, we just want it to vaporize
the condition's code out of the build. So we check it with a `? 1 : 0`, so it
always boils down to a `sizeof (int)`, no matter what data type the condition
actually is.

This works with bitfields, pointers, anything that can be "truthy." If it
isn't truthy, it would fail when assertions are enabled anyhow.

Fixes #15990.

(manually cherry picked from commit daf519ae05)
2026-07-13 18:30:53 -04:00
ExtremelyLazyCat 0e802c12c0 Add Mayflash N64 Controller Adapter mapping for SDL2 2026-07-07 14:09:14 -07:00
Ozkan Sezer 20d8ca0132 ci: bump freebsd and cross-platform-actions 2026-07-05 23:37:56 +03:00
Ozkan Sezer de433838ad SDL_cocoawindow.m: work-around build error due to -Wgnu-folding-constant 2026-07-05 04:51:10 +03:00
Anonymous Maarten bc518123c7 cmake: disable MSVC RUNTIME CHECKS for no-libc shared SDL2 library 2026-07-05 02:55:29 +02:00
Ryan C. Gordon b8b3f5ef20 gamecontroller: Added docs to SDL_GameControllerBindType, to fix wiki docs. 2026-06-22 22:32:16 -04:00
Ryan C. Gordon 1fbce8a06a locale: Fixed \since on SDL_Locale. 2026-06-22 22:11:49 -04:00
Ryan C. Gordon 56846df9b0 locale: Added docs to SDL_Locale struct, to fix wiki docs. 2026-06-22 22:10:02 -04:00
SDL Wiki Bot ca94cb5db0 Sync SDL2 wiki -> header
[ci skip]
2026-06-23 01:36:05 +00:00
Ryan C. Gordon cf83ffd8a1 stdinc: Add a little comment to SDL_bool for wikiheaders. 2026-06-22 21:06:39 -04:00
klirktag a442367706 Android: hide system bars via WindowInsetsController on API 30+
The immersive-fullscreen code hid the status and navigation bars with the
deprecated View.setSystemUiVisibility() flags plus FLAG_FULLSCREEN. On
Android 15+ (API 35), edge-to-edge is enforced for apps targeting SDK 35+
and those flags are ignored, so the bars never hide (e.g. on a Samsung
S25). Android 14 and below still honour them, which is why older devices
were unaffected.

Hide/show the system bars with WindowInsetsController on API 30+ (using
BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE for sticky-immersive), keeping the
legacy setSystemUiVisibility() path for API < 30. The minimum supported
version is unchanged.
2026-06-21 10:15:54 -05:00
Farmer-Markus 3f1534af43 Android treat FULLSCREEN flag as FULLSCREEN_DESKTOP 2026-06-16 11:56:39 -07:00
QwertyChouskie 1414dbf29d SDL_hidapi_xbox360.c: Fix Y axis inversion on macOS (#15792)
Originally, macOS had opposite Y axis inversion as every other platform, likely to correct for an issue with the virtual gamepad reported by the old 360Controller driver.

Wired Xbox 360 controllers using native macOS drivers were first reported to be broken in https://github.com/libsdl-org/SDL/issues/11002.  The inversion was removed in https://github.com/libsdl-org/SDL/commit/7da728a642f2acfbba9543a3587363908d7aa1c3, presumably breaking 360Controller usage, but fixing wired 360 controller using the new native support in macOS 15 and above.  However, this change was reverted without explanation in https://github.com/libsdl-org/SDL/commit/d7b1ba1bfca7c9bf4f57075258ccfa0e0c6b2051 which added explicit support for the Steam Virtual Gamepad.  Presumably, Steam on macOS reports inverted Y axes to match what SDL expected on the platform.  However, this reversion broke the native macOS controller support.  The incorrect inversion also breaks using off-brand 360-class gamepads via the libusb backend of HIDRAW.

Backport of 157c839139 (https://github.com/libsdl-org/SDL/pull/15792) to SDL2
2026-06-11 16:12:15 -07:00
QwertyChouskie 77d2f62c23 Respect SDL_HINT_JOYSTICK_MFI
Backport of 0bd95b0430 (https://github.com/libsdl-org/SDL/pull/15791) to SDL2
2026-06-11 16:12:15 -07:00
tmkk 27e5c2e9a5 Bring back support for 360Controller driver on macOS
Backport 50d0e2ede2 (https://github.com/libsdl-org/SDL/pull/14880) to SDL2
2026-06-11 16:12:15 -07:00
Frank Praznik 819f6ae75b EGL: Ensure the platform extensions exist before using them
The EXT and KHR variants use the same constant values, but the EXT versions are available a bit further back.
2026-06-11 13:16:25 -04:00
Frank Praznik fea9b348c3 wayland: Explicitly specify EGL platform 2026-06-11 12:55:49 -04:00
Akihiko Odaki b3aa7083e2 x11: Explicitly specify EGL platform
Mesa's eglGetDisplay() chooses the native EGL platform from
EGL_PLATFORM, limited autodetection, or the build-time default. If that
selects Wayland while SDL is using the X11 video backend, Mesa can treat
the X11 Display pointer as a wl_display and crash during
eglInitialize().

See: https://gitlab.com/qemu-project/qemu/-/work_items/3540
2026-06-11 12:50:22 -04:00
Anonymous Maarten a0c31c3afc ci: run GDK on older Windows environment 2026-06-11 16:32:27 +02:00
Frank Praznik 79de30a345 wayland: Don't apply display orientation on Sailfish 2026-06-04 18:24:30 -04:00