Sam Lantinga
5637cd009a
Don't assert or change window draggable state if SDL isn't managing hit testing
...
Fixes an assert if the application has set up its own hit testing on macOS
2024-07-29 09:15:55 -07:00
Sam Lantinga
5318e30ee5
Pause and resume Android audio without taking device locks
...
The AAudio driver implemented pause/resume by dangerously locking the audio devices. If there was an audio hotplug event or a background thread tried to interact with the audio system, this could cause deadlocks.
2024-07-29 08:41:40 -07:00
Sam Lantinga
9d35f178a6
Follow up to removing the ancient Android audio driver
2024-07-29 08:06:43 -07:00
Sam Lantinga
691cf15e75
Removed the ancient Android audio driver
...
OpenSLES is well supported on Android 4.0 and later.
2024-07-29 08:05:36 -07:00
Anonymous Maarten
446c05a001
ci: update actions descriptions + fix loongarch64 action
...
[sdl-ci-filter *loongarch64*]
2024-07-29 13:53:27 +02:00
SDL Wiki Bot
3b01a0b884
Sync SDL3 wiki -> header
2024-07-29 11:26:36 +00:00
Sam Lantinga
61a88077a7
Re-added SDL_HINT_APP_ID and SDL_HINT_APP_NAME
2024-07-29 07:26:03 -04:00
Ozkan Sezer
94827e0acd
SDL_mslibc.c: revert PR/10303 changes
2024-07-28 22:48:05 +03:00
Sam Lantinga
45ecea1346
Fixed crash when switching a window from using OpenGL to Metal
2024-07-28 11:43:11 -07:00
Sam Lantinga
e35a559442
Revert "Add two more mapping for Nvidia controller (2019)"
...
This reverts commit 5d6333d6ea4103057e03b1939d1244f3181bafe5, which was accidentally committed during testing.
2024-07-28 11:07:59 -07:00
Sam Lantinga
383ccb2b6a
Finish removing SDL_DECLSPEC_FREE
2024-07-28 08:06:20 -07:00
Arias800
5d6333d6ea
Add two more mapping for Nvidia controller (2019)
...
0500b30c550900001472000001000000 is the ID when the controller is connected via Bluetooth and 0300b30c550900001472000011010000 is for USB mode.
Tested by setting "SDL_GAMECONTROLLERCONFIG" in some games.
2024-07-28 08:06:01 -07:00
Sam Lantinga
dfe6efcd2d
Fixed memory leak in testthread
2024-07-28 08:05:31 -07:00
Sam Lantinga
728bf363cb
Make sure we call SDL_Quit() before SDLTest_CommonDestroyState()
...
Otherwise we'll report leaks that will be cleaned up in SDL_Quit()
2024-07-28 08:05:31 -07:00
Sam Lantinga
b5ad74998b
Removed SDL_DECLSPEC_FREE
2024-07-28 07:24:21 -07:00
SDL Wiki Bot
18fe89e036
Sync SDL3 wiki -> header
2024-07-28 14:23:13 +00:00
Sam Lantinga
a36fe632fd
Added SDL_SetAppMetadata() ( #10404 )
...
Removed duplicate hints SDL_HINT_APP_NAME, SDL_HINT_APP_ID, and
SDL_HINT_AUDIO_DEVICE_APP_NAME.
Wired up a few things to use the metadata; more to come!
Fixes https://github.com/libsdl-org/SDL/issues/4703
2024-07-28 07:22:46 -07:00
hwsmm
35e42d0a25
Remove SDL_DECLSPEC_FREE before SDL_DECLSPEC in gendynapi
2024-07-27 22:31:49 -07:00
Anonymous Maarten
44f1f81d6c
ci: add vita job
2024-07-28 03:12:51 +02:00
Frank Praznik
5617ce277d
wayland: Don't fail to retrieve a system cursor if no window is focused
...
Doing this can leave the cursor data in a weird, corrupt state.
2024-07-27 20:24:24 -04:00
Sam Lantinga
f080336fa6
Fixed memory leak if logging is done after SDL_Quit()
...
If someone calls SDL_Quit(), then runs an SDL function that implicitly initializes TLS or logging, and then calls SDL_Quit() again, we want to make sure we run through the quit process again. Each of the Init/Quit calls are protected against being called multiple times.
2024-07-27 16:46:09 -07:00
Sam Lantinga
82c89c0125
Removed redundant subystem quit calls
...
SDL_Quit() quits everything
2024-07-27 16:46:09 -07:00
Sam Lantinga
95dd8781ce
Do a full cleanup if renderer creation fails during autodetection
2024-07-27 16:46:09 -07:00
Sam Lantinga
ebd059e6eb
Don't send keys consumed by the IME on macOS
...
This makes the macOS behavior match other platforms where the IME eats keys that are used for composing text.
2024-07-27 16:37:05 -07:00
Sam Lantinga
91d2dbdc9d
Fixed memory leak if joysticks were initialized but gamepads were not
...
If a joystick is connected, SDL_IsGamepad() will be called on it, which adds it to the cache, which then needs to be cleaned up when joysticks quit.
2024-07-27 13:44:45 -07:00
Sam Lantinga
7eb2605630
Fixed memory leak when a renderer fails to be created
...
The supported texture formats were leaking. In order to catch future issues, we'll just do a full teardown of the renderer in the failure case, and make sure it's safe to do so with a partially initialized renderer.
2024-07-27 13:36:12 -07:00
Sam Lantinga
da035142b2
Use SDL_InitFlags for the SDL_Init* function implementations
2024-07-27 10:32:11 -07:00
Anthony
7cd23bfb6a
Respect Android's auto-rotate setting when choosing orientation
2024-07-27 09:38:41 -07:00
Sam Lantinga
9da58e9fb7
Fixed storing a key in the persistent string hashtable that's about to be freed
2024-07-27 09:35:22 -07:00
Sam Lantinga
1d5f9c7b92
testaudio: fixed memory leak in SetTitleBar()
2024-07-27 09:16:29 -07:00
Sam Lantinga
473feab2a4
Added SDL_unsetenv()
2024-07-27 09:10:08 -07:00
Sam Lantinga
b854e1fe0b
Fixed some issues found with static analysis
2024-07-27 09:07:42 -07:00
Sam Lantinga
218e45247f
Fixed memory leak when SDL_Init() was called multiple times
2024-07-27 09:06:52 -07:00
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