100 Commits
Author SHA1 Message Date
Anonymous Maarten a296c40867 isfinite is not available on all platforms, so add a bitmasking alternative
Compiler Explorer shows both result in the same assembly.
2025-12-08 20:48:47 +01:00
Anonymous Maarten f896e26f59 tests: find X11 and wayland-client 2025-12-08 20:48:47 +01:00
Anonymous Maarten d19b010d4e cmake: only enable building tests when SDL is the main project 2025-12-08 20:48:47 +01:00
Anonymous Maarten 0e96cbd8ce tests: build tests with C99 standard by default 2025-12-05 08:30:52 -08:00
Anonymous Maarten ccdc9231f5 test: allow GNU extensions 2025-12-04 19:22:19 +01:00
Anonymous Maarten 7b74fbb73f test: build testver in with the C90 standard
By building at least one test in C90 mode, we make sure the SDL headers are C90 compatible.
2025-12-04 18:50:19 +01:00
Anonymous Maarten 3313cb9c4b release: verify SDL_REVISION contains SDL- 2025-12-03 17:13:06 +01:00
Anonymous Maarten eda8d1d842 JNI_Unload must return the JNI version needed by the native library 2025-11-26 14:04:02 +01:00
Anonymous Maarten 1edb850639 Add script to generate macOS and iOS tbds 2025-11-26 01:03:41 +01:00
Anonymous Maarten e221905195 Fix check_stdlib_usage.py libc call matching
It now matches libc usage inside statements,
and skips libc-like usage in strings or as struct members.
2025-11-25 01:07:10 +01:00
Anonymous Maarten 8f21fe4994 testmouse: avoid use-after-free
Bug was introduced in 17a891daa8
2025-11-18 08:35:56 +01:00
Anonymous Maarten 8920736df0 cmake: add testrwlock to CTest test suite 2025-11-17 20:00:02 +01:00
Anonymous Maarten 17a891daa8 test: plug leaks of testmouse and testrwlock 2025-11-17 20:00:02 +01:00
Anonymous Maarten 3ba9bdfc01 test: use SDL_test to parse arguments of tests 2025-11-17 20:00:02 +01:00
Anonymous Maarten 14470755b7 tray: plug leak of cache dir path 2025-11-17 20:00:02 +01:00
Anonymous Maarten d9d0df2534 wayland: plug mutex leak of cursor thread
Fixes this leak of testsprite:
Allocation 0: 40 bytes
	0x7f4d47b0d43c: SDL_calloc_REAL+0x45
	0x7f4d47d149bc: SDL_CreateMutex_REAL+0x17
	0x7f4d47cab5a7: Wayland_StartCursorThread+0x9f
	0x7f4d47cae028: Wayland_InitMouse+0xa7
	0x7f4d47cb36ea: Wayland_VideoInit+0x187
	0x7f4d47bbee85: SDL_VideoInit+0x358
	0x7f4d47a01bfe: SDL_InitSubSystem_REAL+0xe8
	0x7f4d47a3cdf1: SDL_InitSubSystem+0x19
	0x407366: SDLTest_CommonInit+0x108
	0x402fd0: SDL_AppInit+0x605
	0x7f4d47a8771f: SDL_InitMainCallbacks+0x6a
	0x7f4d47d3e6cf: SDL_EnterAppMainCallbacks_REAL+0x43
	0x7f4d47a396f4: SDL_EnterAppMainCallbacks+0x48
	0x401445: SDL_main+0x33
	0x7f4d47a878c6: SDL_RunApp_REAL+0x42
	0x7f4d47a317be: SDL_RunApp_DEFAULT+0x37
	0x7f4d47a3e769: SDL_RunApp+0x32
	0x40146e: main+0x27
	0x7f4d47811575: __libc_start_call_main+0x75
	0x7f4d47811628: __libc_start_main+0x88
	0x400ff5: _start+0x25
2025-11-15 23:10:35 +01:00
Anonymous Maarten 7073cfc58e release: don't use legacy Android CMake toolchain file 2025-11-11 21:46:26 +01:00
Anonymous Maarten 2bc886d0bd testqsort: add custom macro to allow comparing with qsort 2025-11-09 11:24:03 +00:00
Anonymous Maarten 2be18f340f testqsort: use SDLTest_TestSuite 2025-11-09 11:24:03 +00:00
Anonymous Maarten 0da649eb72 release: don't download pre-release dependencies + strict version parsing 2025-11-04 18:00:23 +01:00
Anonymous Maarten 63cb046d38 release: don't use legacy Android CMake toolchain file
[ci skip]
2025-11-02 23:24:51 +01:00
Anonymous Maarten 5ad12c47dc cmake: make sure VARIABLE of check_linker_supports_version_file ends up in cache 2025-10-27 03:01:57 +01: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
Anonymous Maarten c5b0187fc9 cmake: fix typo
INTERFACE_COMPILE_COMPILE_OPTIONS -> INTERFACE_COMPILE_OPTIONS
2025-10-22 19:00:41 +02:00
Anonymous Maarten 7a26bee6ee ci: bump macos-13 to macos-14
macos-13 image is getting retired in December 2025
2025-10-16 20:07:18 +02:00
Anonymous Maarten 57ac8fcded release: test CMake config files of frameworks in xcframeworks in dmg releases 2025-10-16 18:07:34 +02:00
Anonymous Maarten aa57984928 stdinc: add strtok_r prototype for clang-tidy 2025-10-15 14:41:15 -04:00
Anonymous Maarten a472f5ea1e Fix MSVC syntax error
Fixes the following error:
`
error C2059: syntax error: '}'
`
2025-10-13 01:19:17 +02:00
Anonymous Maarten 281ac6c3bb Add elf-dlopen-note test 2025-10-12 15:46:35 -07:00
Anonymous Maarten 45d65f6e1f Older Visual Studio does not provide a intptr_t typedef 2025-10-11 01:00:03 +02:00
Anonymous Maarten 121df30a8a Visual Studio 2003 (and older) do not support variadic macros 2025-10-11 01:00:03 +02:00
Anonymous Maarten 049eeee087 Visual Studio versions older then 6.0 do not support __forceinline 2025-10-11 01:00:03 +02: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
Anonymous Maarten e1fde46a6a Include SDL_internal.h before checking HAVE_FRIBIDI_H
This happened to work because of precompiled headers
2025-10-04 21:25:45 +02:00
Anonymous Maarten f69981cbfb Use space indendation in SDL_fribidi sources 2025-10-04 21:25:45 +02:00
Anonymous Maarten 0f9d032885 ci+docs: add fribidi dependency 2025-10-04 21:25:45 +02:00
Anonymous Maarten f4039d0132 release: don't cache ndk + verify arm64 alignment 2025-10-03 23:54:53 +02:00
Anonymous Maarten 541dc6ba20 android: don't promote custom SDL3::SDL3 targets 2025-10-03 21:08:14 +02:00
Anonymous Maarten fe17e49116 ci: build testffmpeg on ubuntu and mac 2025-10-03 20:59:05 +02:00
Anonymous Maarten 0bbfbf5b37 cmake: use correct suffix in PkgConfigHelper 2025-10-03 20:58:45 +02:00
Anonymous Maarten 23646aed53 cmake: quietly look for SDL3-static and SDL3_test framework in SDL3Config.cmake 2025-10-03 19:14:40 +02:00
Anonymous Maarten e66f7efa2f SDL_WINDOWPOS_* macros are to be used with SDL_[GS]etWindowPosition 2025-10-02 18:24:31 +02:00
Anonymous Maarten fd4c2f8cfd ci: build testffmpeg on MinGW (msys2) build bots 2025-09-30 17:42:11 +02:00
Anonymous Maarten 30c2cda25e Don't use assert(0) for SDL_TriggerBreak
The assert macro is disabled when building with -DNDEBUG.
On Android, the debugger stopped in the wrong frame.
2025-09-30 15:45:26 +02:00
Anonymous Maarten 9f721e8a9c Add test that verifies all SDL3 symbols are available 2025-09-26 21:42:04 +02:00
Anonymous Maarten 4718000dba Add JNI_OnLoad to dynamic API 2025-09-26 21:42:04 +02:00
Anonymous Maarten cdc4609993 Add headers for unsupported sources 2025-09-26 21:42:04 +02:00
Anonymous Maarten f9f172cf60 gamepad: use SDL_PLATFORM_ANDROID macro instead of ANDROID 2025-09-26 21:39:06 +02:00
Anonymous Maarten e62a6e9729 cmake: detect RISC-V architectures
This is only used for naming binary CPack artifacts
2025-09-26 21:39:06 +02:00
Anonymous Maarten d13f66ab7d release: small release script clean-up 2025-09-26 21:39:06 +02:00
Anonymous Maarten 1d42df07ef ci: add macOS 26 job 2025-09-19 18:06:26 +02:00
Anonymous Maarten 7501f7194b testsprite: zero initialize textures
LoadSprite destroys current textures before allocating new ones.
So make sure the previous (=first) textures are valid.
2025-09-19 15:37:21 +02:00
Anonymous Maarten b1b98b10d8 cmake: also install wasm debug map (optional) 2025-09-18 17:18:25 +02:00
Anonymous Maarten 447df411e6 cmake: install javascript and wasm of Emscripten tests 2025-09-18 05:28:22 +02:00
Anonymous Maarten 5dfa2cb88a Use SDL_abort when encountering a internal fatal SDL_assertion error 2025-09-17 22:54:23 +02:00
Anonymous Maarten a7739ceccb Add SDL_internal macro for internal use 2025-09-17 22:54:23 +02:00
Anonymous Maarten 566e7c2379 ci: disable ccache on macOS 13 job 2025-09-17 21:50:26 +02:00
Anonymous Maarten e022c60d3a android: Remove SDL3-static from Android.mk 2025-09-12 17:37:31 +02:00
Anonymous Maarten 901a524d0d Update Fedora Linux system dependencies
- Fedora uses the dnf package manager
- libusb is provided by libusb1-devel
2025-09-08 15:15:12 +02:00
Anonymous Maarten c0fb71f2a9 cmake: fix SDL_UNINSTALL post-configuration report 2025-09-02 21:29:50 +02:00
Anonymous Maarten e15e2808f2 cmake: use 'TargetConditionals.h' on Apple for SIMD tests 2025-09-02 21:29:50 +02:00
Anonymous Maarten 1e7d3b51de cmake: use APPLE in dep_option
expands to <nothing> on e.g. Windows, which will be interpreted as true by cmake_dependent_option.
2025-09-02 21:29:50 +02:00
Anonymous Maarten 2734248544 Remove superfluous '/utf-8' from MSBuild projects 2025-08-28 23:26:48 +02:00
Anonymous Maarten 625a8335b5 Don't compile helper function when building without audio/video/joystick support 2025-08-27 23:19:50 +02:00
Anonymous Maarten c50e4b22ab dlopennot: ngage's g++ compiler does not support variadic macros 2025-08-27 18:53:35 +02:00
Anonymous Maarten 7017fbaa8e release: build aarch64 libraries with 16kiB page size
[ci skip]
2025-08-09 04:51:35 +02:00
Anonymous Maarten de742e9f9a cmake: detect RISCOS platform before GNU/Hurd 2025-08-08 12:47:09 -07:00
Anonymous Maarten 5dc801506b ci: Haiku does not need -DSDL_UNIX_CONSOLE_BUILD=ON
Haiku has a native video system
2025-08-02 03:39:38 +02:00
Anonymous Maarten 2190705754 ci: configure with -DCMAKE_SYSTEM_NAME=Haiku for Haiku
Fixes ci regression introduced in e8b69b03fe
2025-08-02 03:08:03 +02:00
Anonymous Maarten 9e3783996b Fix testnative C90 compatibility 2025-08-01 02:27:54 +02:00
Anonymous Maarten 7b501ae71f Add a few include guards to private headers 2025-08-01 02:00:08 +02:00
Anonymous Maarten 06cafa3040 cmake: explicitly disable UNITY_BUILD property for SDL3 libraries 2025-08-01 01:59:18 +02:00
Anonymous Maarten e6d200e51c ci+n3ds: avoid apt-get package manager
- use Unix Makefiles (with parallelization) CMake generator
- use binutils strings binary from devkitpro
2025-07-26 15:38:08 +02:00
Anonymous Maarten 5e787555e8 ci: build MSVC release binary on windows-2025
(cherry picked from commit 554f08bac3)
2025-07-12 01:54:05 +02:00
Anonymous Maarten cfb8e591cb cmake: remove /RTC1 from CXX flags when building with SDL_LIBC=OFF 2025-07-11 03:25:58 +02:00
Anonymous Maarten f3bf387caf testhotplug+testmouse: exit when pressing ESC key 2025-07-03 02:21:51 +02:00
Anonymous Maarten 89eef1bd34 cmake: Android always needs a native HIDAPI implementation 2025-06-26 22:34:30 +00:00
Anonymous Maarten 520d73ae57 include/SDL_gpu: fix bool members documentation indentation 2025-05-30 16:34:34 +02:00
Anonymous Maarten 5b1e92ae88 cmake: use CMAKE_ANDROID_NDK variable as root of Android ndk
This variable is always defined when targeting Android:
- when using the toolchain file shipped along the ndk
  (using  -DCMAKE_TOOLCHAIN_FILE=$ENV{ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake)
- when using the toolchain file provided by CMake
  (using -DCMAKE_SYSTEM_NAME=Android)
2025-04-25 07:58:16 -07:00
Anonymous Maarten ebb52973e1 cmake: make SDL_CPU_xxx variable visible when using CMAKE_OSX_ARCHITECTURES 2025-04-03 19:07:24 +02:00
Anonymous Maarten 87d6beb895 Rename cmake/sdltargets.cmake -> cmake/sdlcommands.cmake 2025-04-02 23:55:29 +02:00
Anonymous Maarten e87a00c07c tests: port failing SDL_Renderer test from pysdl2 to testautomation
(cherry picked from commit 8436ce98b4)
2025-04-01 21:31:10 +02:00
Anonymous Maarten 10819273bf tests: port failing SDL_Renderer test from pysdl2 to testautomation
(cherry picked from commit 7d8a6f1603)
2025-04-01 21:31:10 +02:00
Anonymous Maarten ffbd434a11 tests: port failing window test from pysdl2 to testautomation
(cherry picked from commit 4f488b9be2)
2025-04-01 21:31:10 +02:00
Anonymous Maarten 2775e7a78f tests: port failing SDL_Rect tests from pysdl2 to testautomation
(cherry picked from commit 39bb71c442)
2025-04-01 21:31:10 +02:00
Anonymous Maarten 39eed1d233 tests: port failing SDL_Hint tests from pysdl2 to testautomation
(cherry picked from commit 177fb9cb6c)
2025-04-01 21:31:10 +02:00
Anonymous Maarten 7f927de1fc x11: remove 'args' and 'ret' from SDL_X11_SYM macro
X11 vararg functions don't extra handling anymore.
2025-03-24 14:32:28 -04:00
Anonymous Maarten de60a5f398 Revert "Make native functions be public otherwise it fails at run-time."
This reverts commit 4fd4d89b63.

This ended up not being necessary since the Android build system
does not minify by default.
When you're minifying, you need to use the proguard rules anyways.

https://github.com/libsdl-org/SDL/pull/12553#issuecomment-2740795848
2025-03-20 19:31:48 +01:00
Anonymous Maarten 9820f655dd android: reduce visiblity as much as possible 2025-03-19 23:36:08 +01:00
Anonymous Maarten b9504f247c opengl: pixelart fragment shader uses GLSL version 1.30 2025-03-15 21:58:10 -07:00
Anonymous Maarten 05531c5f4b release: use NDK r21e for building Android release artifact
[ci skip]
2025-03-16 03:02:18 +01:00
Anonymous Maarten cbdc93b17f cmake: make sure a SDL3 library is present when not using COMPONENTs 2025-03-01 17:54:45 +01:00
Anonymous Maarten 8a7beca122 camera: clear the spec when closing, so re-opening can probe again 2025-03-01 08:34:01 -08:00
Anonymous Maarten 70f657e520 ci: farewell, clang32 on msys2 2025-02-22 19:06:27 +01:00
Anonymous Maarten 5c214e5e9c testcamera: SDL_AppQuit destroys state and SDL
This fixes a double-free of SDLTest_CommonState
2025-02-21 23:04:13 -08:00
Anonymous Maarten 03e00cd347 v4l2: map SDL_PIXELFORMAT_MJPG to V4L2_PIX_FMT_MJPEG 2025-02-21 23:04:13 -08:00
Anonymous Maarten 9d06145d6c ci: fix type + names of intel compiler artifacts 2025-02-21 21:11:54 +01:00
Anonymous Maarten 7855842306 ci: disable precompiled headers for classic intel compiler 2025-02-21 04:49:33 +01:00
Anonymous Maarten 71d1de5d96 ci: add cppflags to CMAKE_(C|CXX)_FLAGS 2025-02-21 04:46:26 +01:00
Anonymous Maarten 28f0867948 SPA_FALLTHROUGH expands to nothing when using the Intel compiler 2025-02-21 04:30:19 +01:00