Commit Graph

19540 Commits

Author SHA1 Message Date
Sam Lantinga
e6987e2452 Fixed emulated touch on Android
This also fixes laser pointer input on Meta Quest headsets

(cherry picked from commit 712ce16469)
2025-10-14 08:40:58 -07:00
Sam Lantinga
4cd6df1997 Added the 8BitDo Ultimate 2C Wireless Controller to the Xbox controller list
Fixes https://github.com/libsdl-org/SDL/issues/14127

(cherry picked from commit 98944ecd0c)
2025-10-13 18:48:05 -07:00
Evan Hemsley
9163913305 GPU: Correctly recycle D3D12 descriptor heaps (#14234)
(cherry picked from commit 20206b8e66)
2025-10-13 13:00:38 -07:00
cosmonaut
b3f4ba0725 GPU: Validate that buffer size is at least 4 bytes
(cherry picked from commit b067dfa345)
2025-10-13 11:07:22 -07:00
Brenton Bostick
354bda8dde fill-in missing DeleteLocalRef calls
(cherry picked from commit e584d2a8a9)
2025-10-13 09:28:44 -07:00
Sam Lantinga
8ccbfdf368 Added support for the ZENAIM ARCADE CONTROLLER
(cherry picked from commit 831ec4dc6c)
2025-10-13 08:56:34 -07:00
DominusExult
19b646849c Adding dSYMs (DWARF debug symbols) to the xcFramework.
Needed to generate debug symbols for both release and debug builds and explicitly set the format so all arches actually generate the dSYMs.
This allows distributing an SDL3 app to the AppStore without the need to generate the dSYMs via script when using either the xcFramework or embedding the SDL3 Xcode project.
Fixes #13573

(cherry picked from commit 98c03c644a)
2025-10-13 08:35:25 -07:00
Sam Lantinga
48a83d69cc Corrected texture colors on PS2 (thanks @Trinth!)
Fixes https://github.com/libsdl-org/SDL/issues/12395

(cherry picked from commit 1ed093ad8b)
2025-10-12 09:21:49 -07:00
Gustaf Alhäll
ec682cc794 Fix SDL_SetRelativeMouseMode failing with software framebuffer on Haiku
(cherry picked from commit 2c63bc7315)
2025-10-11 09:03:01 -07:00
SDL Wiki Bot
d2d655b41f Sync SDL3 wiki -> header
[ci skip]

(cherry picked from commit add18e52c8)
2025-10-09 12:23:30 -07:00
Sam Lantinga
d6021b7d89 Only call clipboard callbacks with mime types they expect
Also clarified that returning NULL from a callback sends zero length data to the receiver, which should be able to handle that.

Fixes https://github.com/libsdl-org/SDL/issues/9586

(cherry picked from commit 23e3cbec20)
2025-10-09 12:23:30 -07:00
Sam Lantinga
8dcb6db823 Only return current clipboard data under X11
Fixes https://github.com/libsdl-org/SDL/issues/10192

(cherry picked from commit 9cf7cdf23a)
2025-10-09 12:23:30 -07:00
Sam Lantinga
d0cfcf10bb Fixed crash getting clipboard data processing clipboard events on X11
SDL_PumpEvents() was freeing the temporary memory in the clipboard event, so if the application was iterating over the mime types in the event and retrieving the clipboard data, it would crash after the first entry.

(cherry picked from commit 3c0a6c32d4)
2025-10-09 12:23:30 -07:00
Edu Garcia
dd791f6838 Fix SDL GPU D3D12 Descriptor Heap leak
When descriptor leaks overflow, the D3D12 SDL GPU renderer fetches more from the pool, but never returns them, which eventually causes an "out of memory" crash.

(cherry picked from commit c74b406a4c)
2025-10-09 08:45:42 -07:00
Sylvain
988714beb9 Fixed bug #14173 - Android / SDL_Renderer Vulkan : going background / foreground produces a black screen.
need to recreate the swap chain + send SDL_EVENT_RENDER_DEVICE_RESET event

(cherry picked from commit 2a96997e90)
2025-10-09 08:41:00 -07:00
Sam Lantinga
78756540cb Recreate the Vulkan GPU swap chain when resuming on Android
Fixes https://github.com/libsdl-org/SDL/issues/12957

(cherry picked from commit 2a92a3c9c5)
2025-10-08 21:09:34 -07:00
Sam Lantinga
205b5c9f44 Ignore invalid width/height in setOrientationBis()
(cherry picked from commit 6f4993ddee)
2025-10-08 20:15:33 -07:00
Sam Lantinga
bca30aafed Ignore VK_SUBOPTIMAL_KHR on the Android platform
This is returned whenever the device has been rotated, and can be safely ignored.

Fixes https://github.com/libsdl-org/SDL/issues/12950

(cherry picked from commit 00ffddece8)
2025-10-08 20:04:13 -07:00
Sam Lantinga
840d5c16d2 Temporarily disabled texture binding validation
There are some advanced use cases that trip over this, so temporarily disabling the validation pending further review.

Reference: https://github.com/libsdl-org/SDL/issues/13871
(cherry picked from commit a2a60f75c7)
2025-10-08 19:53:05 -07:00
Sam Lantinga
25b9a686b0 Added the Wooting 60HE keyboard to the controller blacklist
(cherry picked from commit d4b684311e)
2025-10-08 16:06:41 -07:00
Sam Lantinga
54c2f2c3f7 Only call WIN_RoUninitialize() if WIN_RoInitialize() succeeded
Fixes https://github.com/libsdl-org/SDL/issues/14178

(cherry picked from commit 7914bdb7ea)
2025-10-08 13:16:16 -07:00
Sylvain
b9cf5f08db Fixed bug #13306 - workaround for android issue "java.lang.NullPointerException android.view.View.onResolvePointerIcon"
(cherry picked from commit 10885f4b7e)
2025-10-08 08:05:36 -07:00
Ozkan Sezer
c7a36fa3c9 ci: bump cross-platform-actions.
(cherry picked from commit 97c1df66a8)
2025-10-07 14:28:04 +03:00
Sam Lantinga
73ca5f53e7 Don't treat the Moonlander MK1 Keyboard as a controller
Fixes http://github.com/mgba-emu/mgba/issues/3606

(cherry picked from commit 69791ccad0)
2025-10-06 16:52:36 -07:00
Sam Lantinga
2be2fb4918 Fixed build 2025-10-04 10:28:57 -04:00
Anonymous Maarten
fec1dd4a8b release: don't cache ndk + verify arm64 alignment
(cherry picked from commit f4039d0132)
2025-10-03 23:55:13 +02:00
Sam Lantinga
2a3a8f736c Fixed destination coordinates when using scale with the software renderer
Fixes https://github.com/libsdl-org/SDL/issues/14051

(cherry picked from commit d333044462)
2025-10-03 13:58:57 -07:00
Anonymous Maarten
d3aff13aa3 cmake: use correct suffix in PkgConfigHelper
(cherry picked from commit 0bbfbf5b37)
2025-10-03 21:03:50 +02:00
Nintorch
54fb312a2c Add blacklist words for gamepad names
(cherry picked from commit 6e6dc500b5)
2025-10-03 09:45:31 -07:00
nmlgc
20aa0ad1c5 testautomation: Test SDL_snprintf() for doubles >LLONG_MAX and <ULLONG_MAX
The uclibc version of SDL_snprintf() is currently limited to values
<ULLONG_MAX due to the `unsigned long long` cast in SDL_PrintFloat(),
but it makes sense to at least ensure that it does support the full
unsigned 64-bit range. This also covers the one defined case where a
32-bit MSVC build can't assume that _ftoul2_legacy() == _ftol2().

(cherry picked from commit 8824eace93)
2025-10-03 07:22:59 -07:00
nmlgc
ff667d35f2 SDL_mslibc: Implement _ftoul2_legacy()
cl.exe versions ≥v19.41 call this builtin for double → uint64_t
conversions on x86. SDL currently needs such conversions in:

* MainCallbackRateHintChanged()
* SDL_PrintFloat()
* WIN_ApplyWindowProgress()

This seems enough to justify implementing this function rather than
trying to work around it, as it was done in sdl12-compat:

	https://github.com/libsdl-org/sdl12-compat/issues/352

This implementation was taken from ReactOS:

	https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f637e6b809adb5e0ae420ef4f80c73b19172a2e7

Passes the stdlib testautomation, and also matches the behavior of
Microsoft's 64-bit libc for the currently implementation-defined case
of calling SDL_PrintFloat() with values >SDL_MAX_UINT64.

(cherry picked from commit f39e49a3dd)
2025-10-03 07:22:59 -07:00
nmlgc
ff9599fb7e build: Fix typo in SDL_uclibc target name for 32-bit Windows
(cherry picked from commit 7916af9910)
2025-10-03 07:22:59 -07:00
mccakit
0448f20394 replace script with flags
(cherry picked from commit f6e711c377)
2025-10-02 16:01:17 -07:00
mccakit
db07924104 static release build fix
(cherry picked from commit 2e4bc73916)
2025-10-02 16:01:17 -07:00
mccakit
e60acdc477 android symbol export for release builds
(cherry picked from commit fe92d0a7bd)
2025-10-02 16:01:17 -07:00
Sam Lantinga
d69f658835 Make sure the current resolution is in the fullscreen mode list
Custom resolutions don't enumerate normally, but make sure the current resolution is in the mode list.

Fixes https://github.com/libsdl-org/SDL/issues/11551

(cherry picked from commit b1c2dd8433)
2025-10-02 16:01:17 -07:00
Sam Lantinga
3eb9328d3e Updated to version 3.2.25 for development 2025-10-02 11:36:07 -07:00
Sam Lantinga
a8589a8422 Updated to version 3.2.24 for release release-3.2.24 2025-10-02 10:52:32 -07:00
Simon McVittie
0bdaaf6c76 build: Prefix SDL- to revision from REVISION.txt
This makes it possible to get the version number of an unknown SDL binary
from `strings libSDL3.so.0 | grep SDL-`, like we could for SDL 2.

Resolves: https://github.com/libsdl-org/SDL/issues/14114
Signed-off-by: Simon McVittie <smcv@collabora.com>
(cherry picked from commit 618b7b6c73)
2025-10-02 09:09:03 -07:00
Simon McVittie
390197d3aa build: Prefix version from git with SDL- rather than SDL3-
We can tell it's SDL 3 from the version number and git revision,
so there's no need to duplicate that in the prefix.

Signed-off-by: Simon McVittie <smcv@collabora.com>
(cherry picked from commit d5b79418f4)
2025-10-02 09:09:03 -07:00
Mathieu Eyraud
9fafba49dc Zero-initialize SDL_GPUDevice
(cherry picked from commit 86da08b0be)
2025-10-01 07:23:41 -07:00
Victor Ilyushchenko
5d47efe7fb Fix Metal 3D texture upload stride calculation
Signed-off-by: Victor Ilyushchenko <alt13ri@gmail.com>
(cherry picked from commit a34d31322c)
2025-09-28 07:32:48 -07:00
Sam Lantinga
824234accc Fixed HIDAPI controller disconnect reading on multiple threads
If multiple threads are calling SDL_UpdateJoysticks(), then an overlapped read can be initiated on one thread (read_pending set to true) and GetOverlappedResult() called on another thread. This results in ERROR_OPERATION_ABORTED. This is harmless so we shouldn't return an error in this case, we'll just retry the read on the next call.

Fixes https://github.com/libsdl-org/SDL/issues/14033

(cherry picked from commit b2188b325d)
2025-09-25 10:41:52 -07:00
Frank Praznik
6519158ae5 wayland: Ignore bogus libdecor content sizes if an unmapped window is suspended
If a client takes a long time to present the first frame after creating the window, a configure event to set the suspended state may arrive with libdecor increasing the content size by the decoration dimensions, which should be ignored.

(cherry picked from commit 9d5d7010de)
2025-09-24 10:36:04 -04:00
Frank Praznik
00718d60d2 x11: Use the pending size for the min/max limits if a resize is in flight
Otherwise, an outdated size may be used, reverting the requested resize operation.

(cherry picked from commit 45480f5fe5)
2025-09-24 10:36:04 -04:00
Sam Lantinga
18c2e179ee Use the real window position on macOS
On newer MacBooks, the fullscreen window might be placed below the camera notch, so use the actual window position

Fixes https://github.com/libsdl-org/SDL/issues/10441

(cherry picked from commit 0a50058f7a)
2025-09-23 23:04:41 -07:00
Sam Lantinga
21ae008fc2 Use an empty bitmap for the blank cursor on macOS
Some macOS installations seem to have trouble decoding the GIF we were using

Fixes https://github.com/libsdl-org/SDL/issues/14012

(cherry picked from commit 221d1f12ea)
2025-09-22 19:16:01 -07:00
Sam Lantinga
97a8bb44e6 The default swap interval on EGL is 1, according to the spec
Fixes https://github.com/libsdl-org/SDL/issues/14014

(cherry picked from commit 137b0b2bee)
2025-09-22 11:28:46 -07:00
Ryan C. Gordon
5d33fce898 wav: Patched to compile on Visual Studio.
(cherry picked from commit 09ee8876b3)
2025-09-22 08:14:33 -07:00
Ryan C. Gordon
bb5df96f69 wav: Clamp DATA chunk to size of file if possible.
Prevents a malicious file from malloc'ing multiple gigabytes.

Fixes #10052.

(cherry picked from commit 44e4deab7c)
2025-09-22 08:14:33 -07:00