Ryan C. Gordon
883576beb8
examples: Improve source code output when there are multiple files.
2024-07-30 13:40:09 -04:00
Ryan C. Gordon
bc8b768b9a
examples/snake: Fix up build.
2024-07-30 13:40:01 -04:00
Dylam De La Torre
dbb4e05c28
Add "Snake" game example
2024-07-30 13:26:01 -04:00
Ryan C. Gordon
69a2d7960c
examples: first shot at description text at top of page. Not working yet.
2024-07-30 13:18:58 -04:00
Sami Kyöstilä
b881e19896
android: Update window/surface pointers on change
...
When the native window or surface backing the SDL window changes, e.g.,
when the activity is resumed, we should also update the corresponding
window pointer properties (SDL_PROP_WINDOW_ANDROID_{WINDOW,SURFACE}
_POINTER) so that they remain in sync.
2024-07-30 09:27:53 -07:00
Ryan C. Gordon
6a25e94472
examples: Print a description of the program to the console on startup.
2024-07-30 12:23:07 -04:00
Sam Lantinga
a6407e88da
Document the events that need to be handled in a callback
2024-07-30 07:52:13 -07:00
Sam Lantinga
f039b2290a
Added logging for life cycle events
2024-07-30 07:52:13 -07:00
Ryan C. Gordon
900213e16e
examples: Pop up the console on new output for three seconds if hidden.
2024-07-30 09:45:06 -04:00
Ryan C. Gordon
6559cfb143
examples: make SDL_Log work with the Emscripten console.
...
Fixes #10410 .
2024-07-30 08:59:52 -04:00
Ryan C. Gordon
fbed34a645
cmake: Don't warn about lack of X11/Wayland backend on Emscripten.
2024-07-30 00:33:08 -04:00
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