Commit Graph

16483 Commits

Author SHA1 Message Date
Sam Lantinga 623a90c47d testutils: use SDL_asprintf() to simplify path composition 2024-07-27 08:41:06 -07:00
Sam Lantinga 625bc2d250 Fixed getting the initial window safe area
Fixes testsprite and testwm on desktop platforms
2024-07-27 08:40:31 -07:00
Anonymous Maarten 12eb1f1497 ci: limit jobs by using sdl-ci-filter
[sdl-ci-filter msvc-*]
2024-07-27 15:19:20 +00:00
Anonymous Maarten eae6758abe ci: build haiku as canary 2024-07-27 15:19:20 +00:00
Anonymous Maarten da8aa84c1d ci: merge all workflows into one 2024-07-27 15:19:20 +00:00
Anonymous Maarten 3374e57102 stdinc: strcasecmp is declared in strings.h 2024-07-27 15:19:20 +00:00
Anonymous Maarten 76f60c4b66 riscos: fix -Wunused-variable 2024-07-27 15:19:20 +00:00
Anonymous Maarten 3bfc103e76 tests: start memory tracking first + clean up cached text textures 2024-07-27 13:44:04 +02:00
Anonymous Maarten 6f1136c6ce testgles2: fix leaks 2024-07-27 13:06:54 +02:00
Anonymous Maarten 8a5d1fc196 cmake: add swift test 2024-07-27 08:39:55 +02:00
Anonymous Maarten 37881b3150 cmake: use genex to link with Apple Frameworks 2024-07-27 08:37:21 +02:00
Sam Lantinga 538adc52d2 Removed the temporary memory symbols from the public API 2024-07-26 21:10:47 -07:00
SDL Wiki Bot 0f2fc2fbaa Sync SDL3 wiki -> header 2024-07-27 03:59:43 +00:00
Sam Lantinga 4f55271571 Removed temporary memory from the API
It was intended to make the API easier to use, but various automatic garbage collection all had flaws, and making the application periodically clean up temporary memory added cognitive load to using the API, and in many cases was it was difficult to restructure threaded code to handle this.

So, we're largely going back to the original system, where the API returns allocated results and you free them.

In addition, to solve the problems we originally wanted temporary memory for:
* Short strings with a finite count, like device names, get stored in a per-thread string pool.
* Events continue to use temporary memory internally, which is cleaned up on the next event processing cycle.
2024-07-26 20:59:14 -07:00
Sam Lantinga 21411c6418 Don't apply creation window flags to external windows.
Whoever provided the window has already set it up the way they want it.

Fixes SDL removing iconified or maximized state when creating a window from an existing OS window.
2024-07-26 10:39:05 -07:00
SDL Wiki Bot 2137e6eed1 Sync SDL3 wiki -> header 2024-07-26 17:05:33 +00:00
Sam Lantinga 5e513ecc7f Don't automatically free temporary memory, let the application call SDL_FreeTemporaryMemory() when it's ready.
Also mark up all functions that return temporary memory with SDL_DECLSPEC_TEMP, to help people implementing language bindings.

Fixes https://github.com/libsdl-org/SDL/issues/10378
2024-07-26 10:05:03 -07:00
Eduard Gushchin 2f38a4bf5e Fixed a typo in the link to the GetTouchFingers function 2024-07-26 07:59:08 -07:00
SDL Wiki Bot a1a8278029 Sync SDL3 wiki -> header 2024-07-26 00:47:35 +00:00
Sam Lantinga 750aef2bee Clarified that temporary memory shouldn't be kept beyond the current function scope or event handling. 2024-07-25 17:47:00 -07:00
SDL Wiki Bot a880410cb2 Sync SDL3 wiki -> header 2024-07-25 23:58:09 +00:00
Frank Praznik 66eb2ea443 mouse: Make pointer warp emulation via relative mode available to all platforms
Move the Wayland pointer warp emulation code up to the SDL mouse layer, and activate it when a client attempts to warp a hidden mouse cursor when the hint is set.

testrelative adds the ability to test the warp emulation activation/deactivation with the --warp parameter and 'c' key for toggling cursor visibility.
2024-07-25 19:57:39 -04:00
Eduard Gushchin 92667e3066 Update SDL_keycode.h
Removed the link referring to yourself
2024-07-25 14:12:04 -07:00
Eduard Gushchin 3ee59359c4 Fix documentation references and update method usage for SDL_GetGamepadGUIDForID in SDL_gamepad.h
In the documentation for the SDL_GetGamepadGUIDForID method in the SDL_gamepad.h file, there are two references to the methods SDL_GetGamepadGUID and SDL_GetGamepadGUIDString, but there are no methods of its own. I replaced these two methods with the existing SDL_GUIDToString.
2024-07-25 11:43:41 -07:00
Anonymous Maarten 2aad26abb0 cmake: gate all preseeding behind SDL_PRESEED option 2024-07-25 16:42:11 +00:00
Ryan C. Gordon 546cd3ac83 cmake: Preseed CMake cache for Emscripten builds.
Makes a from-scratch build on this laptop go from 2 minutes 42 seconds to
28 seconds!
2024-07-25 16:42:11 +00:00
Dmitry Marakasov 0cd4fc7c87
Allow to enable vulkan support on FreeBSD (#10361) 2024-07-25 09:31:40 -07:00
Sam Lantinga 42650d79c1 Moved Android event initialization to SDL_InitEvents() 2024-07-25 09:25:00 -07:00
Ryan C. Gordon 53022aeb5e
examples: Use the existing CMake infrastructure instead of rolling our own. 2024-07-25 11:56:19 -04:00
hwsmm 8fa550e003 Check window fullscreen flag in SDL_GetWindowSizeInPixels 2024-07-25 08:49:50 -07:00
Sam Lantinga e9a7014e56 Fixed hanging after onDestroy() on Android 2024-07-25 07:34:25 -07:00
Anonymous Maarten 9826f73230 cmake: fix copying of resource files on uwp 2024-07-25 16:01:57 +02:00
Anonymous Maarten 9f9ebcd40a cmake: fix copying of example resource files on desktop, ps2 and psp 2024-07-25 14:54:20 +02:00
Sam Lantinga e387314a67 Fixed building on older macOS SDK 2024-07-25 05:44:54 -07:00
Anthony d6554a9505 Fix running on Android 9 and older 2024-07-25 04:41:43 -07:00
Daniel Ludwig 76c4c16ca9 Fix DXGI cleanup code 2024-07-25 11:35:10 +03:00
Daniel Ludwig ff66ec5fb5 GDK build: fix Xbox targets 2024-07-25 11:35:10 +03:00
Daniel Ludwig 7e48d4522b GDK build: move suspend/constrain setup back to previous compilation unit 2024-07-25 11:35:10 +03:00
Daniel Ludwig 0a678a654e GDK build: fix project settings and API changes 2024-07-25 11:35:10 +03:00
SDL Wiki Bot ba8495c214 Sync SDL3 wiki -> header 2024-07-25 00:41:44 +00:00
Sam Lantinga cf8b158ccb Added SDL_GetRenderSafeArea() 2024-07-24 17:40:41 -07:00
Sam Lantinga eb09264076 Added the safe area to the debug window information 2024-07-24 17:40:41 -07:00
Sam Lantinga 9e6d5babce Fixed display detection after the monitor resolution changed on X11 2024-07-24 17:46:25 -07:00
Sam Lantinga b98e1e9ef0 Fixed the render viewport not updating when the metal view resizes
When the phone is in portrait mode and the window is in landscape mode, the view changes orientation after layoutSubviews runs. In this case we need some way of notifying the application that the Metal view has changed.
2024-07-24 16:12:29 -07:00
Ryan C. Gordon 195c26a50a
examples: Add a way to add datafiles to an example, and add audio/load-wav 2024-07-24 17:30:55 -04:00
Sam Lantinga f562a6d9f7 Added Android API level 35 to the table 2024-07-24 14:09:54 -07:00
Sam Lantinga e7771fb4f6 Fixed memory corruption in SDL_GetPreferredLocales()
Fixes https://github.com/libsdl-org/SDL/issues/10362
2024-07-24 13:37:40 -07:00
Sam Lantinga 31730bef1a Fixed running on Android 10 and older (thanks @AntTheAlchemist!) 2024-07-24 13:37:40 -07:00
Sam Lantinga c601120883 Handle all Android lifecycle events on the main thread
This restructuring also allows us to wait efficiently in SDL_WaitEvent() on Android
2024-07-24 13:37:40 -07:00
Sam Lantinga a7c0192017 Renamed SDL_PostSemaphore() to SDL_SignalSemphore() 2024-07-24 13:37:40 -07:00