Majjcom
4b69833bc5
Windows: Fix window caption drawing on borderless windows
2026-05-04 08:31:28 -07:00
Stanislav Aleksandrov
039a60c527
video: NULL-check display in SDL_DestroyWindow
2026-04-28 07:59:47 -04:00
Cameron Gutman
3ebdcc5b1c
atomic: Fix and cleanup SDL_UnlockSpinlock()
...
- Add missing SDL_MemoryBarrierRelease() in the generic codepath
- Remove Watcom and MSVC x86/x64 cases which are now identical to the generic codepath
- Fix Solaris barrier to ensure prior stores are visible before unlocking
2026-04-27 19:50:19 -05:00
Cameron Gutman
15275898f0
atomic: Use acquire/release InterlockedExchange intrinsics on ARM64EC
2026-04-24 19:07:17 -05:00
Cameron Gutman
157ca95985
Fix UWP build
2026-04-24 18:54:30 -05:00
atirado.net
c8ebb1456e
Backport VIRPIL Controls device IDs to SDL2
...
Backport of SDL3 fix (libsdl-org/SDL#15418 ).
VIRPIL Controls (VID 0x3344) flight sticks are
misclassified as gamepads by SDL's axis-count
heuristic because they report exactly 6 axes,
matching SDL_GAMEPAD_AXIS_COUNT. Adding them to
the appropriate device lists ensures correct
classification.
Tested on Linux (Fedora 43, kernel 6.19) with:
- R-VPC Stick MT-50CM3 (PID 0x4391)
- L-VPC Stick MT-50CM3 (PID 0x8390)
- VPC VMAX Prime Throttle (PID 0x0196)
2026-04-21 05:24:27 -10:00
Cameron Gutman
30de669b32
atomic: Fix missing full memory barrier on GCC/Clang
...
__sync_lock_test_and_set() is designed for creating locks, not as
a general atomic exchange function. As a result, it only provides
an acquire memory barrier and isn't guaranteed to actually store
the provided value (though it does on architectures we care about).
__atomic_exchange_n() is supported on GCC/Clang for the last ~10
years, so let's use that instead if available. We will keep the
__sync_lock_test_and_set() fallback around for ancient platforms,
but add a full memory barrier to match the documented behavior.
2026-04-20 06:17:49 -04:00
Cameron Gutman
725db83c23
atomic: Use __atomic_load_n on Android
2026-04-14 18:13:15 -05:00
Cameron Gutman
cf5f7965df
atomic: Switch to _SDL_HAS_BUILTIN to detect __atomic_load_n
2026-04-14 18:13:15 -05:00
Cameron Gutman
9cc2f248f5
kmsdrm: Fix order of GBM and EGL teardown
...
All locked front buffers must be released prior to destroying
the EGL surface to avoid causing a UAF in libnvidia-egl-gbm.so.
2026-04-10 19:26:43 -05:00
Sam Lantinga
dd01e096e9
Added a hint "SDL_SURFACE_MALLOC" to disable aligned surface allocation
...
This is needed for sdl12-compat, where all surfaces were not aligned.
2026-04-02 10:36:56 -07:00
Regan Green
f9e82031f4
Limit DirectSound maximum sample rate
2026-03-25 23:11:28 -04:00
Ozkan Sezer
a7d4b1996f
minor os/2 emx build fix.
2026-03-17 05:02:50 +03:00
Ozkan Sezer
e7e24a1ee5
SDL_dynapi.c, os/2: remove unnecessary include.
2026-03-17 00:20:20 +03:00
Kushagra Shukla
650aceb609
Backport 8BitDo HIDAPI Driver to SDL2 ( #15207 )
2026-03-14 15:20:29 -07:00
hexnet1234
99ecc409cf
Fix Wayland_DestroyWindow SEGFAULT
...
Check if the wind pointer is NULL, to avoid SEGFAULT.
Already implemented in SDL3, but not yet backported.
2026-02-20 13:04:11 -05:00
Alexandre Derumier
cf5dabd6ea
Correct the sensor axis ordering with the Linux Nintendo driver
...
Fixes https://github.com/libsdl-org/SDL/issues/14552
Manual cherry-pick of 5e9163592f by Sam Lantinga <slouken@libsdl.org >
2026-02-12 11:32:59 -08:00
Wohlstand
c080cc8068
SDL_render_psp.c: Also apply the similar fix to PSP
...
Since this problem is the same here
2026-02-06 09:01:33 -08:00
Wohlstand
2956d55797
SDL_render_vita_gxm.c: Fixed the black screen due to zero cliprect
...
#14645
2026-02-06 09:01:33 -08:00
Ozkan Sezer
b1d95b9d20
SDL_cocoawindow.m: fix what seems to be a typo in commit 649c36c5:
...
NSWindowCollectionBehaviorNone -> NSWindowCollectionBehaviorFullScreenNone
2026-02-06 06:04:40 +03:00
Ryan C. Gordon
649c36c576
cocoa: Fix SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES=0.
...
This hint is documented to not just turn off fullscreen windows going into a
new Fullscreen Space, but also to make the green button on a resizeable
window's title bar do a maximize/zoom instead of make the window fullscreen.
Previously, this only did the former and not the latter (or perhaps it worked
and the defaults changed in a newer macOS, we aren't sure).
Fixes #7470 .
(cherry picked from commit 50f3adec77 )
2026-02-05 18:53:41 -05:00
Henrique Jorge Barateli
99eca2ca0d
Fixed PS2 joystick analog sticks not enabled
2026-01-30 12:18:31 -08:00
Ozkan Sezer
07274fea58
SDL_bsdjoystick: fix OpenBSD build error due to -Wundef
2026-01-30 01:20:28 +03:00
Wolf3s
f383330cfa
Fix the video size matching the renderer.
2026-01-19 10:10:53 -08:00
Ryan C. Gordon
cb0fb8c1a1
haiku: Minor code convention cleanups.
...
Reference PR #14779 .
2026-01-07 14:06:48 -05:00
erysdren
1dda484085
haiku: update modelist logic
2026-01-07 14:00:54 -05:00
erysdren
e14514f484
haiku: fix modelist double-free
2026-01-07 14:00:54 -05:00
Sam Lantinga
f432937f9c
Updated copyright for 2026
2026-01-01 09:51:07 -08:00
Sam Lantinga
13db7f049a
Added a Linux mapping for the Nacon GC100 controller (thanks @elkabyliano!)
...
(cherry picked from commit d10fe8bf2f )
2025-12-29 09:47:29 -08:00
Peppersawce
bacfd3c252
Make BUrl not 'ambiguous'
2025-12-10 12:28:20 +01:00
PulkoMandy
47312cf0f3
Use a BHandler attached to the application instead of a BLooper
...
When there is already a BApplication, SDL cannot start its own. In a
previous version, it instead started a separate looper. This results in
some extra complexity as there is now yet another thread to manage (in
addition to the main thread, the application thread, and the window
threads).
Instead, create a BHandler and attach it to the existing BApplication,
which allows it to receive messages in the already existing application
thread.
2025-12-10 12:28:20 +01:00
Sam Lantinga
d9836d15e7
Lock joysticks when they are connected/disconnected on emscripten
...
Fixes https://github.com/libsdl-org/SDL/issues/11499
(cherry picked from commit 0281071243 )
2025-12-08 21:00:22 -08:00
Cameron Gutman
3146374e4a
egl: Fix X11 EGL window creation on Nvidia
...
This is a port of 808a3f5 to SDL2.
Fixes #13094
2025-12-05 23:51:56 -05:00
Cameron Gutman
1d852d1c28
quit: don't call signal() if we're using sigaction()
...
At best, this is a no-op.
At worst, it might:
- Clobber a signal handler someone registered after us
- Overwrite the signal mask or flags
- Cause unregistration to fail (sigaction() isn't guaranteed to return the exact pointer passed to signal())
2025-12-01 18:56:12 -06:00
Sam Lantinga
6ad5a966ea
Revert "Use DefWindowProc for the initial SDL window proc"
...
This reverts commit afeeef9cf5 .
2025-11-24 19:06:13 -08:00
yuanhecai
c44d37b5cf
loongarch: Switch to software render when using LG100 series
2025-11-14 07:14:48 -08:00
Sam Lantinga
f36d683b61
Check for wine_get_version() to detect Wine/Proton
...
If this application is being run under Wine but Steam doesn't know that, Steam won't set STEAM_COMPAT_PROTON. So we'll use wine_get_version() to detect that we're running under Wine instead.
(cherry picked from commit e2e8f86076 )
2025-11-12 23:07:51 -08:00
Sam Lantinga
5bdf7bc625
Don't check SteamVirtualGamepadInfo when running as Wine
...
Wine will ignore the Steam Virtual Gamepad if it looks like it has the original (blocked) controller VID/PID.
Fixes https://github.com/libsdl-org/SDL/issues/14410
(cherry picked from commit 493bc621e4 )
2025-11-12 23:07:51 -08:00
Ozkan Sezer
ba38fda752
Revert "pipewire: disable -Wdeclaration-after-statement for pipewire headers"
...
This reverts commit f9435eab16 .
Issue in pipewire release candidate 1.5.81 has been resolved in 1.5.82
Reference issue: Fixes: https://github.com/libsdl-org/SDL/issues/14343
2025-11-06 19:55:02 +03:00
yuanhecai
14eebdab3c
loongarch: add SDL_FillRect4LSX opt
2025-11-06 07:27:56 -08:00
yuanhecai
686c18026b
loongarch: add BlitRGBtoRGBPixelAlphaLSX opt
2025-11-06 07:27:56 -08:00
Sam Lantinga
6db23faa44
Clamp the audio drain delay to 100 ms
...
Fixes https://github.com/libsdl-org/SDL/issues/9829
(cherry picked from commit 0882623092 )
2025-11-02 11:20:39 -08:00
Sam Lantinga
6570d9e23f
Don't consider USB devices which have already been skipped
...
Fixes https://github.com/libsdl-org/SDL/issues/14367
2025-11-02 09:25:13 -08:00
Sam Lantinga
2bb0eb4641
Fixed the right touchpad calculation for the BLE Steam Controller
...
Fixes https://github.com/libsdl-org/SDL/issues/14368
(cherry picked from commit eb87a36940 )
2025-11-02 08:34:16 -08:00
Sam Lantinga
afeeef9cf5
Use DefWindowProc for the initial SDL window proc
...
This makes sure that anything that hooks window creation to set up window proc hooks will call DefWindowProc instead of infinitely recursing when we set up our window proc afterwards.
Fixes https://github.com/libsdl-org/SDL/issues/10529
(cherry picked from commit 6c4f2bd83d )
2025-11-02 07:24:54 -08:00
Petar Popovic
398bacbac3
Fix leak in SDL_GameControllerTypeForIndex()
2025-11-01 08:40:12 -07:00
Ozkan Sezer
f9435eab16
pipewire: disable -Wdeclaration-after-statement for pipewire headers
...
Fixes: https://github.com/libsdl-org/SDL/issues/14343
2025-11-01 00:45:10 +03:00
Sam Lantinga
66ac6f4ea7
Revert "Remove special-case Xbox 360 wireless controller mappings"
...
This reverts commit 4151df83fe .
2025-10-27 17:37:43 -07:00
Dave Wickham
4151df83fe
Remove special-case Xbox 360 wireless controller mappings
...
Effectively https://github.com/libsdl-org/SDL/pull/14339 for SDL2
Fixes https://github.com/libsdl-org/SDL/issues/14324
2025-10-27 08:56:00 -07:00
Ozkan Sezer
00d4f1c2c4
SDL_kmsdrmvideo.c: fix build in C90 mode
2025-10-26 04:35:20 +03:00