Commit Graph

19453 Commits

Author SHA1 Message Date
Anonymous Maarten
e8cc359b5e cmake: use 'TargetConditionals.h' on Apple for SIMD tests
(cherry picked from commit e15e2808f2)
2025-09-02 22:35:20 +03:00
Anonymous Maarten
3b4a198655 cmake: use APPLE in dep_option
expands to <nothing> on e.g. Windows, which will be interpreted as true by cmake_dependent_option.

(cherry picked from commit 1e7d3b51de)
2025-09-02 22:35:02 +03:00
Ethan Lee
03dd1520a3 gpu: VK_KHR_get_physical_device_properties2 can be optional
(cherry picked from commit 689049f8ec)
2025-09-02 09:53:59 -07:00
Sam Lantinga
a6fd74fa3b Fix crash when enumerating Steam Controllers
Closes https://github.com/libsdl-org/SDL/pull/13746
2025-09-02 08:42:16 -07:00
Sam Lantinga
03b36bac94 Updated to version 3.2.23 for development 2025-09-01 15:12:43 -07:00
Sam Lantinga
a96677bdf6 Updated to version 3.2.22 for release release-3.2.22 2025-09-01 14:40:32 -07:00
Ryan C. Gordon
67f89d0a2b openslES: Patched to compile.
(whoops.)

(cherry picked from commit 7323104f97)
2025-09-01 11:10:33 -04:00
Ryan C. Gordon
f6de8877ec openslES: OpenSL ES on Android only supports two formats, limit to that.
(Three with the floating point extension, which we use.)

This is according to:

https://developer.android.com/ndk/guides/audio/opensl/opensl-for-android

Previously, this would accept a request for Sint8 or Sint32 and disaster
would ensue.

Fixes #13779.

(cherry picked from commit 0b2a003a35)
2025-09-01 10:31:05 -04:00
Ozkan Sezer
7c189b1f17 cmake: revert commit 5d1bbd9 and change sse4.2 test
clang doesn't support -mcrc32 until version 14.0, therefore drop -mcrc32
use in sse 4.2 test, and change it to check _mm_cmpgt_epi64() instead of
_mm_crc32_u32(). without this, sse4.2 check was failing with clang <= 13

Fixes https://github.com/libsdl-org/SDL/pull/12223

(cherry picked from commit 875653658a)
2025-08-31 03:20:40 +03:00
Sam Lantinga
a7947080c0 Fixed warnings building with Visual Studio
(cherry picked from commit 7c8df4ea52)
2025-08-30 10:16:11 -07:00
Sam Lantinga
08c82a3781 Fixed build
(cherry picked from commit 3cf2350f21)
2025-08-30 10:15:48 -07:00
Jordan Saunders
589aea50c2 Fix two uninitialized variables
Found when running in valgrind looking at another issue.

- RenderPass' depth_stencil_target
    Tripped in SDL_BindGPUFragmentSamplers when not binding a DS target

- VulkanCommandBuffer's swapchainRequested
    Tripped in VULKAN_Submit for the end transition barrier when
    creating an image. The field is only reset when reused, not on first
    use

(cherry picked from commit 265236d952)
2025-08-30 06:05:43 -07:00
Ozkan Sezer
72acd7c9df CI: add OpenBSD workflow
(cherry picked from commit c0e5fd55d2)
2025-08-30 14:22:24 +03:00
Frank Praznik
1a70d1158e fs: Fix OpenBSD path retrieval
Set the path start pointer to point to a valid string.

(cherry picked from commit fdfde42db1)
2025-08-30 14:21:24 +03:00
Frank Praznik
ae915c6516 wayland: Add a sigtimedwait() implementation for OpenBSD
sigtimedwait() is an optional part of POSIX.1-2001, and OpenBSD doesn't implement it. Add a replacement implementation based on https://comp.unix.programmer.narkive.com/rEDH0sPT/sigtimedwait-implementation

(cherry picked from commit 1049426a76)
2025-08-30 14:21:00 +03:00
Xander
54d573332e Add SDL_SENSOR_COUNT to SDL_SensorType
(cherry picked from commit dc7a3a1219)
2025-08-29 07:31:25 -07:00
Matthew Zavislak
0204a69f6b Add elf alignment check for Android artifacts (#13818)
(cherry picked from commit 4f11feb708)
2025-08-28 16:31:25 -07:00
Susko3
b2689ff76a Avoid checking for HAVE_POSIX_SPAWN on Android
This makes the CMake build closer to SDL_build_config_android.h
as both will now use SDL_PROCESS_DUMMY.

(cherry picked from commit cd21bbe796)
2025-08-28 04:10:16 -07:00
Ozkan Sezer
611940fb80 cmake: fall back to -Wconversion if -Wfloat-conversion isn't available
... during checks for valid isinf/isinff/isnan/isnanf macros.

(cherry picked from commit 98bed62259)
2025-08-27 22:20:37 +03:00
Nintorch
16c0329a2a Add Emscripten joystick rumble support
Adds support for Emscripten (Web) joystick rumble support via EM_ASM_INT macros and HTML5's Gamepad API.

(cherry picked from commit 1fbed16cb0)
2025-08-25 12:59:15 -07:00
Nintorch
2743716132 Allow Android to ignore unnecessary joysticks
Previously, SDL_ShouldIgnoreJoystick wasn't being called for Android, and fingerprint sensors were recognized as joysticks.

(cherry picked from commit 1af7dfb0a7)
2025-08-25 11:23:34 -07:00
Colin Kinloch
a744eee993 testffmpeg: avutil queue family version check
The `AVVulkanDeviceQueueFamily` struct was introduced by libavutil
59.34.100

(cherry picked from commit 81920b5db7)
2025-08-25 11:10:31 -07:00
Evan Hemsley
0e24267eb5 gpu: D3D12 only requires feature level 11_0 with Resource Binding Tier 2. (#13782)
We previously thought this wasn't possible because constant buffer offsets and
partial updates were unavailable, but we were reading the wrong table - this is
only the case for D3D11...

https://learn.microsoft.com/en-us/windows/win32/direct3d11/overviews-direct3d-11-devices-downlevel-intro

... while 12 doesn't list this feature at all:

https://learn.microsoft.com/en-us/windows/win32/direct3d12/hardware-feature-levels

We double checked and Jesse Natalie confirmed that this feature is required for
D3D12 even for 11_0 drivers. (Thanks Jesse!)

Additionally, D3D12 requires that UAVs are accessible from all shader stages,
meaning Tier 2 is enough to support the number of UAVs we need. Tier 1 could be
a property to lower the requirements, but that can be done later.
2025-08-22 14:07:58 -07:00
Wilson Jallet
f4d6043aa4 GPU: Fix Vulkan indexing error for resolve attachment refs (#13768)
(cherry picked from commit 03b14f5211)
2025-08-19 12:13:23 -07:00
Petar Popovic
9fb9bd31a3 emscripten tests: fix warning: uninitialized variable
(cherry picked from commit 45feacf608)
2025-08-13 17:01:31 -07:00
ChaseKnowlden
c3828bb0a3 Keep MSVC Flags Consistent across CMake runs
(cherry picked from commit 10478c59db)
2025-08-12 19:39:44 -07:00
Sam Lantinga
40371f0907 Support the "ambient" value for SDL_HINT_AUDIO_CATEGORY
Fixes https://github.com/libsdl-org/SDL/issues/13732

(cherry picked from commit 4725213eef)
2025-08-12 09:54:43 -07:00
Sylvain
94f9434564 Fixed bug #13493: Assertion failure at SDL_AddTouch with Android API 28
Java touch id should be -1 because it's reserved for internal SDL
synthetic events.
It should also not be 0, because this is SDL invalid value.

(cherry picked from commit 970c0bfe96)
2025-08-12 09:44:04 -07:00
Chase Knowlden
bfaf247d30 Update NDK version to 28 (#13729)
* Update NDK version to 28 and add 16kb page size linker flags to x86_64

* Remove Android Linker Options

16kb page size is now the default since NDK r28c

* Update Android CI to use NDK 28

(cherry picked from commit 6e422e5ff2)
2025-08-12 07:46:27 -07:00
Beyley Cardellio
2287c43b59 GPU: Hold submit lock before waiting for device idle
(cherry picked from commit e699f3dca1)
2025-08-10 07:22:19 -07:00
Petar Popovic
15cc0f5f91 linux/SDL_syshaptic.c:SDL_SYS_HapticStopAll(): Fix return on error
(cherry picked from commit 43f3991398)
2025-08-09 09:28:02 -07:00
Anonymous Maarten
68e0108b1c release: build aarch64 libraries with 16kiB page size
[ci skip]

(cherry picked from commit 7017fbaa8e)
2025-08-09 05:23:43 +02:00
Mohamed Shazan
7b3796bc39 SDL_TriggerBreakpoint() will default to __debugbreak() on MinGW toolchain on windows
(cherry picked from commit f4c124e4bf)
2025-08-08 16:21:15 -07:00
Petar Popovic
b5bc6d2cc4 SDL_SendJoystickVirtualSensorDataInner(): Fix max_sensor_events increment
(cherry picked from commit d9c20cfd0a)
2025-08-08 12:52:03 -07:00
Petar Popovic
0d1d4ea1f9 SDL_SetRenderDrawBlendMode(): Remove redundant param check
(cherry picked from commit b63c32e790)
2025-08-08 14:06:27 -04:00
Pino Toscano
1a48f897f2 ime: fcitx: use SDL_GetExeName() in GetAppName()
Use the existing SDL_GetExeName(), available for all the UNIX
platforms, in the internal GetAppName(); this has few advantanges:
- SDL_GetExeName() (and SDL_GetAppID() that builds on top of it) are
  used in various places already; since it caches the executable name,
  this may remove one extra read of the application name
- SDL_GetExeName() has a non-dummy implementation in more OSes than
  GetAppName(), thus providing a small improvement for this IME

As drive-by change: since SDL_GetExeName() provides a constant string,
there is no more need to allocate a new string in GetAppName(), which
is used as constant string anyway. Hence, return a constant string in
GetAppName() too.

(cherry picked from commit 248bcf6b29)
2025-08-07 13:58:27 -07:00
Simon McVittie
2b42789de6 Fix some typos detected by Debian's lintian QA tool
I assume the demoninator is a typo, rather than an indication that
someone has been playing too much Doom :-)

Signed-off-by: Simon McVittie <smcv@collabora.com>

(cherry picked from commit d83503f80e)
2025-08-07 13:55:44 -07:00
Simon McVittie
b9c1da10ba hints: Rephrase documentation to improve grammar
"This thing allows to do something" is not really grammatically correct.
The closest rephrasing would be "allows one to do something" or "allows
the user to do something", but I think the passive voice reads more
naturally here.

Detected by Debian's lintian QA tool.

Signed-off-by: Simon McVittie <smcv@collabora.com>
(cherry picked from commit 40b941c826)
2025-08-07 13:55:44 -07:00
cosmonaut
56f5a76696 GPU: Fix uninitialized value in Vulkan command buffer structure
(cherry picked from commit fe6b2161bf)
2025-08-07 13:42:16 -07:00
Sam Lantinga
c7e8977e60 Revert "Support Google Play 16 KB Page Size Requirement (#13470)"
This reverts commit edef6e66e9

If you need to support the Google Play 16 kiB page size requirement, the recommendation is to use NDK r28c or newer, which automatically aligns binaries correctly.
2025-08-07 11:41:43 -07:00
Pino Toscano
e6ba3612db SDL_endian.h: extend Linux way for GNU libc
The currently used way to determine the endianness (i.e. include
<endian.h> and use the __BYTE_ORDER macro) is provided in general by
GNU libc. Thus, extend that to any platform/OS based on GNU libc.

(cherry picked from commit 561c99ee11)
2025-08-06 16:13:44 -07:00
Frank Praznik
5e77fb314c win32: Use the current flags to determine if NCCALCSIZE is required
SDL_GetWindowFlags() also ORs in pending flags, whereas the current state is needed here, particularly when creating/showing a window.

(cherry picked from commit cd0c660dea)
2025-08-05 18:49:41 -04:00
Frank Praznik
1a2841deb1 win32: Use STYLE_BORDERLESS when showing a pending fullscreen window
In addition to hiding the border on bordered windows that will immediately become fullscreen, The combination of flags used in STYLE_BORDERLESS_WINDOWED will still show the borders on borderless windows if the initial window size exactly matches the desktop, so STYLE_BORDERLESS must be used instead.

(cherry picked from commit 90a023007f)
2025-08-05 15:59:06 -04:00
Mathieu Eyraud
688637eca8 Fix condition for setting HDR properties
(cherry picked from commit a05aca51ec)
2025-08-05 09:26:12 -07:00
Frank Praznik
85d1d70ca1 cocoa: Wait for fullscreen spaces transitions to complete if switching to an exclusive mode
If attempting to switch to an exclusive mode while a fullscreen spaces transition is active, wait until the transition is complete before trying to apply the changes, or the window can wind up in a weird, broken state if a mode switch occurs while in a fullscreen space.

(cherry picked from commit f44a98729c)
2025-08-05 12:17:01 -04:00
Frank Praznik
09356c709a Revert "cocoa: Don't re-enter a fullscreen space if leaving to enter an exclusive mode"
This reverts commit 07b9e86d02.

It turns out that the problem is elsewhere, related to needing to block mode changes until spaces transitions are complete.
2025-08-04 23:51:47 -04:00
Frank Praznik
07b9e86d02 cocoa: Don't re-enter a fullscreen space if leaving to enter an exclusive mode
Doing so can leave the window in a weird, offset state.

(cherry picked from commit ee8f2861e7)
2025-08-04 22:16:22 -04:00
Sam Lantinga
8e46e5d8b4 Updated to version 3.2.21 for development 2025-08-04 11:54:34 -07:00
Sam Lantinga
96292a5b46 Updated to version 3.2.20 for release release-3.2.20 2025-08-04 09:58:55 -07:00
Petar Popovic
ffa618c00b SDL_LoadWAV_IO(): On error, set *audio_buf to NULL and *audio_len to 0
(cherry picked from commit 23e08f7807)
2025-08-03 13:44:37 -04:00