Commit Graph

16730 Commits

Author SHA1 Message Date
Ryan C. Gordon
89cc526a67
examples: Fix out-of-tree builds. 2024-07-30 00:13:32 -04:00
Semphris
949765a3b0 Stylize examples/template.html 2024-07-29 23:41:43 -04:00
Sam Lantinga
de209c81d1 Fixed macOS build 2024-07-29 17:38:59 -07:00
Sam Lantinga
9fac7d7eb0 metal: set the shader input type based on the colorspace, not the pixel format
Fixes https://github.com/libsdl-org/SDL/issues/10402
2024-07-29 17:18:45 -07:00
Sam Lantinga
61e78830d0 Revert "Revert "Fixed warning: result of comparison of constant 9223372035 with expression of type '__kernel_old_time_t' (aka 'long') is always true""
This reverts commit 8caebf823a.
2024-07-29 14:45:03 -07:00
Sam Lantinga
8caebf823a Revert "Fixed warning: result of comparison of constant 9223372035 with expression of type '__kernel_old_time_t' (aka 'long') is always true"
This reverts commit 299d181984.
2024-07-29 14:44:02 -07:00
Sam Lantinga
0a924b185d Fixed crash with joystick rumble after disconnection
This prevents continuing a rumble after the first one fails, and fixes a long standing crash issue if rumble is started immediately before the controller is disconnected.

Thanks to @AntTheAlchemist for the key bug report that showed what was happening here.

Fixes https://github.com/libsdl-org/SDL/issues/10422
2024-07-29 13:35:58 -07:00
Sam Lantinga
67b973b5fa Fixed whitespace 2024-07-29 12:52:11 -07:00
Ryan C. Gordon
614a88ca3b SDL_IOFromFile: Apple targets no longer use the app bundle's resources dir.
Fixes #8403.
2024-07-29 15:44:51 -04:00
Sam Lantinga
299d181984 Fixed warning: result of comparison of constant 9223372035 with expression of type '__kernel_old_time_t' (aka 'long') is always true 2024-07-29 12:04:08 -07:00
Sam Lantinga
930d83aed2 Fixed warning: implicit conversion loses integer precision: 'VkDeviceSize' (aka 'unsigned long long') to 'size_t' (aka 'unsigned int') 2024-07-29 12:01:53 -07:00
Sam Lantinga
c4582a6536 Fixed warning building on tvOS 2024-07-29 11:56:28 -07:00
Sam Lantinga
062caeaa4b Fixed Android build with audio disabled
These functions are called by the Android event code regardless of whether audio is enabled

Fixes https://github.com/libsdl-org/SDL/issues/10418
2024-07-29 10:40:10 -07:00
Frank Praznik
51cccf3fa2 video: Disable relative warp emulation when warping the cursor after a fullscreen transition
Otherwise, relative mode can be accidentally activated if the cursor is hidden.
2024-07-29 12:46:48 -04:00
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 5d6333d6ea, 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