Commit Graph

16433 Commits

Author SHA1 Message Date
Anthony 27f86cbe18 Update proguard-rules.pro to include onNativeInsetsChanged 2024-07-24 10:22:45 -07:00
Sam Lantinga 83c7ce2681 Android life cycle behavior more closely matches iOS
On iOS, the application gets one last change to process messages before going into the background. We do the same on Android, which more closely matches the previous behavior.
2024-07-24 06:18:18 -07:00
Sam Lantinga ca4bd4b63c Android life cycle behavior more closely matches iOS
This change also decouples the pause/resume handling from the video subsystem on Android, so applications that don't use SDL for video can get application life cycle events.

The semantics for the life cycle events are that they need to be handled in an event watch callback, and once they've been delivered, the application will block until it's been resumed. SDL_HINT_ANDROID_BLOCK_ON_PAUSE can be used to control that behavior, and if that's set to "0", then the application will continue to run in the background at low CPU usage until being resumed or stopped.

SDL_HINT_ANDROID_BLOCK_ON_PAUSE_PAUSEAUDIO has been removed, and the audio will be paused when the application is paused.

Fixes https://github.com/libsdl-org/SDL/issues/3193
2024-07-24 05:11:13 -07:00
Sam Lantinga fff783de6c Fixed life cycle events on iOS when using main callbacks 2024-07-24 05:11:13 -07:00
Sam Lantinga 45fc548562 Don't queue application events that need to be handled immediately
This makes it more clear that these events can't be handled in the normal event loop. It also makes pause and resume transparent to applications that don't handle them, which is a nice side effect.
2024-07-24 05:11:13 -07:00
Sam Lantinga fa0918a686 Renamed SDL life cycle functions
This maps better to how SDL delivers the events, and the iOS delegate methods are in the documentation for reference.
2024-07-24 05:11:13 -07:00
Ryan C. Gordon 06c0ed68b1 mac: Rename Objective-C classes that conflict with SDL2.
Fixes #6709.
2024-07-24 01:35:04 -04:00
Sam Lantinga f0363a0466 Functions that return display modes return temporary memory.
Also use the real pointer to display modes for internal mode processing

Fixes https://github.com/libsdl-org/SDL/issues/10353
2024-07-23 19:26:19 -07:00
SDL Wiki Bot 10dcae784b Sync SDL3 wiki -> header 2024-07-24 00:07:31 +00:00
Sam Lantinga 457ca3995c Added SDL_GetWindowSafeArea()
Fixes https://github.com/libsdl-org/SDL/issues/3243
2024-07-23 17:06:04 -07:00
Sam Lantinga 1c4cc2b024 Updated Android minimum API level to 21 (Android 5.0)
This is necessary for the window safe area support, and is a reasonable default for SDL 3.0
2024-07-23 17:06:04 -07:00
Sam Lantinga 57dcd7993f Update the package name in the app build.gradle
Also only change the name of the activity in AndroidManifest.xml, not all of the descriptive text saying to change the name of the activity.
2024-07-23 17:06:04 -07:00
Sam Lantinga a432221db5 Specify that this script uses python3
Fixes running on macOS
2024-07-23 17:06:04 -07:00
SDL Wiki Bot 230161a50c Sync SDL3 wiki -> header 2024-07-23 22:49:23 +00:00
Ryan C. Gordon bd65d154d5
examples: Added audio/simple-playback-callback. 2024-07-23 17:52:42 -04:00
Ryan C. Gordon ea137cfbaf
examples: Fix window titles. 2024-07-23 17:52:24 -04:00
Ryan C. Gordon 35a1cf910a
examples/audio/simple-playback: Add a description to the example. 2024-07-23 17:33:33 -04:00
Sam Lantinga 66011e497d Removed duplication in SDL_EGL_* function names 2024-07-23 13:11:37 -07:00
Eduard Gushchin 86934975b9 Update SDL_video.h
Fixed a typo in the function name in the documentation for SDL_EGL_GetProcAddress
2024-07-23 12:48:10 -07:00
Ryan C. Gordon f5f44de155
examples: Add audio/01-simple-playback. 2024-07-23 14:52:31 -04:00
Ryan C. Gordon 5216aea31d
examples: Explicitly call SDL_Init(). 2024-07-23 14:52:30 -04:00
Sam Lantinga ff7a60db85 Minor fixes to the primitive example
* The random number generator is automatically seeded, no need for SDL_srand()
* Draw the points first, so they don't overlap the other primitives and look like broken line drawing
2024-07-23 08:34:15 -07:00
Sam Lantinga b499c54af4 Fixed testvulkan on macOS (thanks @proton991!)
Fixes https://github.com/libsdl-org/SDL/issues/10351
2024-07-23 08:17:22 -07:00
Sam Lantinga 5c00e54073 Updated SDL_migration.cocci for SDL_GUIDFromString rename (thanks @sezero!) 2024-07-23 08:14:13 -07:00
Ryan C. Gordon 4d8b938969
examples: Added renderer/primitives example. 2024-07-23 10:37:14 -04:00
Ryan C. Gordon 266744af03
examples: Number examples, so they are presented in a specific order. 2024-07-23 10:12:53 -04:00
Ryan C. Gordon 23cf09163e
examples: More n3ds build fixes. 2024-07-23 01:35:15 -04:00
Ryan C. Gordon 3671497ea1
examples: Maybe fix n3ds builds. 2024-07-23 01:28:19 -04:00
Ryan C. Gordon d2e2b9bdc9
examples: Maybe fix Android builds. 2024-07-23 01:25:29 -04:00
Ryan C. Gordon d8d7212efd
examples: Maybe fix UWP builds. 2024-07-23 01:22:19 -04:00
Ryan C. Gordon a03ecaacb0
workflows: Enable building examples on GitHub Actions. 2024-07-23 01:04:05 -04:00
Ryan C. Gordon 16535b7ee2
examples: Add CMake glue to optionally build examples, as we do for the tests.
In fact, most of the CMake code was stolen from the test directory.
2024-07-23 00:58:57 -04:00
Ryan C. Gordon 2038620717
examples/README: fixed typo. 2024-07-22 23:41:16 -04:00
Ryan C. Gordon 15562564ad
build-web-examples: Run highlight with `--enclose-pre` option. 2024-07-22 23:23:53 -04:00
Ryan C. Gordon 549317e0e4
build-web-examples: Minor tweaks. 2024-07-22 23:05:59 -04:00
Ryan C. Gordon 2de83359ba
build-web-examples: Fix CMake dir. 2024-07-22 22:55:41 -04:00
Ryan C. Gordon 70348d77e1
build-web-examples: It's usually `/bin/bash` on Linux, not `/usr/bin/bash`. 2024-07-22 22:42:32 -04:00
Ryan C. Gordon 5339b4458d
examples: Added initial examples infrastructure. 2024-07-22 22:39:09 -04:00
Ryan C. Gordon 2f6e34d2d0
wikiheaders: Added copyright comment to the top of file. 2024-07-22 22:39:09 -04:00
SDL Wiki Bot 2aea74aa84 Sync SDL3 wiki -> header 2024-07-22 22:19:38 +00:00
Sam Lantinga a36be94ad1 More clarification on temporary memory 2024-07-22 15:19:26 -07:00
Sam Lantinga 29f0fd33dc SDL_getenv() should return const
This also allows us to use SDL_FreeLater() and make SDL_getenv() thread-safe on Windows.
2024-07-22 13:00:39 -07:00
Sam Lantinga ef21e31a9a SDL_GUIDFromString() renamed SDL_StringToGUID() 2024-07-22 12:39:15 -07:00
SDL Wiki Bot 5e12706ae0 Sync SDL3 wiki -> header 2024-07-22 17:05:52 +00:00
Eduard Gushchin 24bb95f60c Fixed a typo in the name of the method in the documentation for SDL_GetDisplayProperties 2024-07-22 10:04:59 -07:00
Sam Lantinga c4bf5f9f59 SDL_CreateTexture() uses the SDL_TextureAccess type for the access parameter 2024-07-22 09:32:02 -07:00
Frank Praznik b0713a7d30
x11: Track cursor visibility internally
Cursor visibility in the SDL input layer only reflects whether ShowCursor/HideCursor was called. In the case of relative mode, the cursor can be hidden, but the SDL_Mouse visibility flag will be true.

Track cursor visibility separately in the X11 driver. Fixes the cursor becoming visible when using the warping relative mode with XWayland.
2024-07-22 12:03:07 -04:00
SDL Wiki Bot 3e943090d0 Sync SDL3 wiki -> header 2024-07-22 14:50:48 +00:00
Eduard Gushchin 61565b7f61 Update SDL_video.h
Led to the actual list of WindowsFlag in the documentation of the SDL_CreateWindow method
2024-07-22 07:50:07 -07:00
SDL Wiki Bot 40cb3fb74a Sync SDL3 wiki -> header 2024-07-22 14:35:35 +00:00