Commit Graph

986 Commits

Author SHA1 Message Date
walle
f5efba34da Fix multi-platform compilation issues 2026-02-03 20:09:04 -08:00
Anonymous Maarten
5f151f4532 cmake: cannot detect deprecated apple-clang link options (they are not fatal)
So skip these
2026-02-03 20:54:02 +01:00
Anonymous Maarten
b0a9f40e28 cmake: dfix disabling dlopen notes when configuring with -DSDL_DLOPEN_NOTES=OFF 2026-02-01 19:24:03 +01:00
eleir9268
f4a541682a Up-to-date QNX support (#14806)
Co-authored-by: Roberto Speranza <rsperanza@qnx.com>
Co-authored-by: Darcy Phipps <dphipps@qnx.com>
Co-authored-by: Pierce McKinnon <pimckinnon@qnx.com>
2026-01-30 15:32:43 -08:00
Aaron Benjamin
9a91d7236a GPU: OpenXR integration (#14837)
Based on Beyley's initial draft in #11601.

Co-authored-by: Beyley Cardellio <ep1cm1n10n123@gmail.com>
Co-authored-by: Ethan Lee <flibitijibibo@gmail.com>
2026-01-30 17:18:51 -05:00
Anonymous Maarten
821ab81a62 cmake: force disable SDL_HIDAPI_LIBUSB when SDL_HIDAPI is disabled 2026-01-30 07:32:19 -08:00
Anonymous Maarten
339a91c5ba cmake: disable SDL_SHARED default if shared is not available 2026-01-24 17:10:26 +01:00
Anonymous Maarten
1d587e94e1 cmake: only mark SDL_{SHARED,STATIC} as cache variables if they were already cache variables 2026-01-21 21:36:10 +01:00
Brad Smith
410a35fbee cmake: Fix header detection with CheckUSBHID
Make use of check_include_files to be able to also include
stdint.h when checking for the headers. Fixes detection of
usbhid.h on OpenBSD.

/usr/include/usbhid.h:40:2: error: unknown type name 'uint32_t'
   40 |         uint32_t _usage_page;
      |         ^
2026-01-18 10:29:51 -08:00
Anonymous Maarten
6f19fecba3 cmake: compile SDL_uclibc separately for shared and static SDL3, ensuring fPIC for shared SDL3 2026-01-13 23:27:49 +01:00
Anonymous Maarten
d73e74f9bf cmake: add SDL_FULL_VERSION target property containing full SDL version 2026-01-05 23:34:46 +01:00
Brad Smith
1d51671cbe cmake: Enable Vulkan support on OpenBSD 2026-01-01 11:44:50 -08:00
Anonymous Maarten
fc4f45f0e3 Updated to version 3.5.0 for development 2026-01-01 17:30:41 +01:00
Sam Lantinga
d15ecb21be Updated to version 3.4.1 for development 2025-12-31 18:18:45 -08:00
Sam Lantinga
a962f40bbb Updated to version 3.4.0 for release 2025-12-31 16:43:54 -08:00
Simon McVittie
b6f4e10bf9 unix: If setuid or setgid, don't use GTK
GTK explicitly doesn't support being used setuid or setgid, and if SDL
loads and initializes GTK, GTK will exit the process if it
detects a setgid executable. This is incompatible with the historical
practice of making game executables setgid in order to write out a
shared high-score table on multi-user systems (which is security theatre
at best, because typical game runtime libraries are not hardened against
an untrusted caller, but making it regress would be a user-observable
regression in sdl2-compat).

Helps: https://github.com/libsdl-org/sdl2-compat/issues/564
Signed-off-by: Simon McVittie <smcv@debian.org>
2025-12-28 10:19:33 -08:00
Sam Lantinga
d583fc88be Updated to version 3.3.7 for development 2025-12-16 09:38:05 -08:00
Sam Lantinga
ef0a604d44 Updated to version 3.3.6 for preview release 2025-12-16 08:54:04 -08:00
Anonymous Maarten
6665ebaa2e SDL_test: allow disabling colorized output 2025-12-15 23:19:25 +01:00
Anonymous Maarten
d19b010d4e cmake: only enable building tests when SDL is the main project 2025-12-08 20:48:47 +01:00
Sam Lantinga
db3ee5d62b Enable building the tests by default
A common use case is asking someone to clone SDL and run a test. This simplifies the instructions so we don't also have to tell them how to enable the tests. Anyone savvy can just add -DSDL_TESTS=OFF if they don't want to have them.
2025-12-08 08:15:12 -08:00
Sam Lantinga
7773157fae Updated to version 3.3.5 for development 2025-12-07 09:30:04 -08:00
Sam Lantinga
f173fd28f0 Updated to version 3.3.4 for preview release 2025-12-06 14:57:22 -08:00
eafton
36976ecb43 X11TK: Introduce Thai support and rewrite/cleanup messagebox positioning code (#14474) 2025-11-20 15:26:46 -08:00
Sam Lantinga
168e4eb532 Fixed typo (thanks @Clownacy!) 2025-11-20 09:47:28 -08:00
tsst-tsst
d4bef0d5ba Add support for tcc to cmake (#14464)
This PR adds support to the cmake build scripts so to allow building SDL with the Tiny C Compiler (tcc).

TinyCC supports the subset of C99 used by SDL and will complete the build once the --version-script linker flag is removed. The changes have been tested with various build configurations, including X11 and Wayland, and using tcc version 0.9.28rc 2025-10-27 mob@f4e01bfc on x86_64 Linux.
2025-11-15 11:24:15 -08:00
Anonymous Maarten
6905714986 android: remove dependency on cpu-features.h
android: remove dependency on cpu-features.h

getauxval got introduced into bionic well before Android 5.0
2025-11-11 23:41:43 +00:00
yuanhecai
dc5b136930 loongarch: add SDL_FillSurfaceRect4LSX opt 2025-11-03 08:45:51 -08:00
yuanhecai
0b1eb4c841 loongarch: add Blit8888to8888PixelAlphaSwizzleLSX opt 2025-11-03 08:45:51 -08:00
techflashYT
b3dd0995df cmake: don't auto vectorize with AltiVec on PPC
Allowing GCC/Clang to auto-vectorize with AltiVec support breaks support
for non-AltiVec compatible processors.  Adding this option allows the
existing AltiVec specific code to function as it always did, but
prevents the compiler from inserting AltiVec instructions into arbitrary
codepaths that SDL can't gate off via the existing CPUInfo code.
2025-10-30 21:56:52 -07:00
Anonymous Maarten
766532948e cmake: SDL_process on unix needs vfork symbol
Current FIL-C toolchains don't have vfork
2025-10-26 23:22:37 +01:00
antonegas
33f1008d01 Added Emscripten support for Sensor API 2025-10-26 07:58:28 -07:00
Sam Lantinga
be781fc8f5 Updated to version 3.3.3 for development 2025-10-23 22:41:03 -07:00
Sam Lantinga
b31c4b70b3 Updated version and documentation for 3.3.2 preview release 2025-10-23 15:20:26 -07:00
Frank Praznik
427f838f58 unix: Add ppoll support
Allows for finer grained timeout values, and fixes a FIXME.

This also drops the legacy select() fallback path in favor of presuming that poll() is always available. poll() is part of the POSIX.1-2001 standard, has been available in Unix since some time in the 1980s, the BSDs since at least the early 90s, and Linux since kernel 2.1, which predates kernel support for Pthreads. glibc also has its own emulation using select(), if necessary.
2025-10-17 14:30:10 -04:00
Sam Lantinga
ee622c570a Made SDL_dlopennote.h a public header 2025-10-10 12:47:42 -07:00
Anonymous Maarten
40d8ec4be9 cmake: cannot use CheckSymbolExists for _alloca
_alloca is an intrinsic function on MSVC, which means it has no address and is no symbol.
Hence CheckSymbolExists will always fail finding it.
2025-10-10 17:31:33 +02:00
eafton
c2429e85ec X11TK: Add Arabic/Hebrew/Farsi support by increasing font size slightly and using FriBidi. (#14134) 2025-10-03 19:08:24 -07:00
nmlgc
7916af9910 build: Fix typo in SDL_uclibc target name for 32-bit Windows 2025-10-03 07:21:20 -07:00
mccakit
f6e711c377 replace script with flags 2025-10-02 15:46:58 -07:00
mccakit
2e4bc73916 static release build fix 2025-10-02 15:46:58 -07:00
mccakit
fe92d0a7bd android symbol export for release builds 2025-10-02 15:46:58 -07:00
Simon McVittie
618b7b6c73 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>
2025-10-02 09:08:29 -07:00
Simon McVittie
d5b79418f4 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>
2025-10-02 09:08:29 -07:00
Adrian
d86e0db683 always link to GameController on iOS and related Apple platforms 2025-09-22 08:13:21 -07:00
Adrian
670e4d2ae6 Use -Wno-deprecated-declarations on apple platforms 2025-09-21 15:17:33 -07:00
Sam Lantinga
597ef58966 Use zenity messageboxes by default on X11
This makes messageboxes consistent between X11 and Wayland.
2025-09-20 08:37:51 -07:00
Sam Lantinga
aca9bd02bf Make sure DEBUG is defined for debug configurations 2025-09-16 09:12:33 -07:00
Ryan C. Gordon
2ede37f5a3 cmake: Removed unused SDL_GPU_DXVK bits.
Reference Issue #13938.
2025-09-13 11:24:55 -04:00
Ozkan Sezer
5907bf2555 cmake: remove GetDpiForMonitor() assignment from shellscalingapi.h check
It always fails, because we don't set the needed link library, i.e. shcore.
Besides, SDL3.dll doesn't link to shcore.dll, it links to it at runtime, so
it is unnecessary to check for that symbol here.

Reference issue: https://github.com/libsdl-org/SDL/pull/13904
2025-09-09 04:55:32 +03:00