Commit Graph

2981 Commits

Author SHA1 Message Date
SDL Wiki Bot a699ff2419 Sync SDL3 wiki -> header 2024-08-04 17:49:28 +00:00
Sam Lantinga bc1c3f826f Added SDL_HINT_LOGGING documentation to the logging category page.
Fixes https://github.com/libsdl-org/SDL/issues/10335
2024-08-04 10:48:42 -07:00
SDL Wiki Bot 454c85ad51 Sync SDL3 wiki -> header 2024-08-04 17:39:54 +00:00
Sam Lantinga 6da4278d37 Clarify how to check for EOF in SDL_ReadIO() documentation.
Fixes https://github.com/libsdl-org/SDL/issues/8564
2024-08-04 10:37:51 -07:00
Sam Lantinga ef6521aee7 testnative: print events with --info event 2024-08-04 09:07:19 -07:00
SDL Wiki Bot cb440ec4a4 Sync SDL3 wiki -> header 2024-08-03 13:40:37 +00:00
Sam Lantinga cd5f0d2cce Added SDL_RectToFRect() 2024-08-03 06:40:06 -07:00
SDL Wiki Bot 2f24e9c2f2 Sync SDL3 wiki -> header 2024-08-03 13:30:08 +00:00
SDL Wiki Bot b5c0921196 Sync SDL3 wiki -> header 2024-08-03 02:37:43 +00:00
Anonymous Maarten f57c597c60 Added SDL_GetWindowFromEvent 2024-08-03 02:37:11 +00:00
SDL Wiki Bot e058aa6d65 Sync SDL3 wiki -> header 2024-08-02 21:50:11 +00:00
Sam Lantinga 50492e1d03 Change the text input defaults to match the natural input experience 2024-08-02 14:49:37 -07:00
Sam Lantinga 81f8e6aba6 Added SDL_StartTextInputWithProperties()
This allows you to customize the text input so you can have numeric text entry, hidden passwords, etc.

Fixes https://github.com/libsdl-org/SDL/issues/7101
Fixes https://github.com/libsdl-org/SDL/issues/7965
Fixes https://github.com/libsdl-org/SDL/issues/9439
2024-08-02 14:49:37 -07:00
SDL Wiki Bot f01d4278c6 Sync SDL3 wiki -> header 2024-08-01 20:49:00 +00:00
Sam Lantinga 31ed3665ad Added support for high-DPI cursors and icons
Fixes https://github.com/libsdl-org/SDL/issues/9838
2024-08-01 13:48:28 -07:00
Sam Lantinga 94d9229ce2 Added SDL_AddSurfaceAlternateImage(), SDL_SurfaceHasAlternateImages(), SDL_GetSurfaceImages() and SDL_RemoveSurfaceAlternateImages()
These functions allow you to create surfaces with alternate high DPI content, and will be used for high DPI icon and cursor support.
2024-08-01 13:48:28 -07:00
Sam Lantinga 22ffb487d0 Added SDL_ScaleSurface() 2024-08-01 13:48:28 -07:00
Anonymous Maarten 68fb07787b cmake: Remove HAVE_D3D12_H from sources and introduce SDL_RENDER_D3D(11|12) 2024-08-01 17:49:02 +00:00
SDL Wiki Bot 2e058ba7a4 Sync SDL3 wiki -> header 2024-08-01 05:37:11 +00:00
Sam Lantinga a5f18048b2 Extend the 9-grid functions to handle a non-uniform grid layout (thanks @zaun!)
Fixes https://github.com/libsdl-org/SDL/issues/10389
2024-07-31 22:36:39 -07: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 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
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
Sam Lantinga 383ccb2b6a Finish removing SDL_DECLSPEC_FREE 2024-07-28 08:06:20 -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
Sam Lantinga 473feab2a4 Added SDL_unsetenv() 2024-07-27 09:10:08 -07:00
Anonymous Maarten 3374e57102 stdinc: strcasecmp is declared in strings.h 2024-07-27 15:19:20 +00: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
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
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 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
Sam Lantinga f562a6d9f7 Added Android API level 35 to the table 2024-07-24 14:09:54 -07:00
Sam Lantinga a7c0192017 Renamed SDL_PostSemaphore() to SDL_SignalSemphore() 2024-07-24 13:37:40 -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 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
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