Sam Lantinga
c4eac60000
SDL_GetClipboardData() follows the SDL_GetStringRule
2024-07-19 12:22:03 -07:00
Sam Lantinga
61a7a0e579
SDL_GUIDToString() follows the SDL_GetStringRule
...
Also removed the distinction between SDL_GUID and SDL_JoystickGUID
2024-07-19 12:22:03 -07:00
Sam Lantinga
892df4bf4b
SDL_GetWindowICCProfile() follows the SDL_GetStringRule
2024-07-19 12:22:03 -07:00
Sam Lantinga
eb22fcce35
SDL_GetTouchDevices() follows the SDL_GetStringRule
2024-07-19 12:22:03 -07:00
Sam Lantinga
856d598d6e
SDL_GetSensors() follows the SDL_GetStringRule
2024-07-19 12:22:03 -07:00
Sam Lantinga
4f8c348402
SDL_GetPreferredLocales() follows the SDL_GetStringRule
2024-07-19 12:22:03 -07:00
Sam Lantinga
9be73ed7c5
SDL_GetMice() follows the SDL_GetStringRule
2024-07-19 12:22:03 -07:00
Sam Lantinga
6ca18ed0e5
SDL_GetKeyboards() follows the SDL_GetStringRule
2024-07-19 12:22:03 -07:00
Sam Lantinga
5ce0aacaa4
SDL_GetGamepads() follows the SDL_GetStringRule
2024-07-19 12:22:03 -07:00
Sam Lantinga
4961af4569
SDL_GetJoysticks() follows the SDL_GetStringRule
2024-07-19 12:22:03 -07:00
Sam Lantinga
b32c9615a7
SDL_GetHaptics() follows the SDL_GetStringRule
2024-07-19 12:22:03 -07:00
Sam Lantinga
9de8cb888a
SDL_GetFullscreenDisplayModes() follows the SDL_GetStringRule
2024-07-19 12:22:03 -07:00
Sam Lantinga
9758e102bc
SDL_GetDisplays() follows the SDL_GetStringRule
2024-07-19 12:22:03 -07:00
Sam Lantinga
01199469de
SDL_GetCameras() follows the SDL_GetStringRule
2024-07-19 12:22:03 -07:00
Sam Lantinga
0fe6603747
SDL_GetCameraSupportedFormats() follows the SDL_GetStringRule
...
Also changed the function to return an array of pointers and added example usage to testcamera
2024-07-19 12:22:03 -07:00
Sam Lantinga
637e9700dd
Standardize placement of '*' in function declarations
...
Implemented using these sed commands on the headers:
sed -E -i'' '/SDLCALL|;/ s,([a-z])\* ,\1 *,g' *
sed -E -i'' 's,(\(.*[^\*])\* ([a-z])(.*\)),\1*\2\3,g' *
sed -E -i'' 's,\*const,* const,g' *
sed -E -i'' 's,\*SDLCALL,* SDLCALL,g' *
sed -E -i'' 's,void\(,void (,g' *
git checkout *gl*
2024-07-19 12:22:03 -07:00
Sam Lantinga
bdafc8e212
SDL_GetWindows() follows the SDL_GetStringRule
2024-07-19 12:22:03 -07:00
Sam Lantinga
8ca6caeda5
SDL_GetAudioPlaybackDevices() and SDL_GetAudioRecordingDevices() follow the SDL_GetStringRule
2024-07-19 12:22:03 -07:00
Sam Lantinga
ef884c8aa6
Transfer event memory between the local pool and the event queue
...
This allows threads to free memory from their local pool without affecting events that are queued, and to transfer memory ownership cleanly between threads that are queuing and dequeuing events.
2024-07-19 12:22:03 -07:00
Sam Lantinga
f95ecac300
Added SDL_ClaimEventMemory()
2024-07-19 12:22:03 -07:00
Sam Lantinga
2816745f48
Allow passing a pointer to SDL_FreeEventMemory()
...
Also clarify in the documentation that you should not call SDL_FreeEventMemory(NULL) from your main thread.
2024-07-19 12:22:03 -07:00
Sam Lantinga
217330a7b3
Made return value descriptions more consistent across the API
2024-07-19 12:22:03 -07:00
Sam Lantinga
d73c7311d5
Clarify that the SDL_GetStringRule means that SDL will automatically free the memory later.
2024-07-19 12:22:03 -07:00
SDL Wiki Bot
e949f12f63
Sync SDL3 wiki -> header
2024-07-18 01:04:46 +00:00
Sam Lantinga
02a072a1b7
Added SDL_ClearSurface() and SDL_ReadSurfacePixelFloat()
2024-07-17 18:04:16 -07:00
Sam Lantinga
de6595bda6
SDL_MUSTLOCK() should return true if the surface needs locking even if it's currently locked.
...
There's a bunch of code that assumes this in SDL, and presumably in applications as well.
2024-07-17 18:04:16 -07:00
Sam Lantinga
334962b056
Enhancements for SDL_PremultiplyAlpha()
...
The function can now convert between pixels of different formats, and takes a parameter to control whether the premultiplication is done in sRGB or linear space.
Also added SDL_PremultiplySurfaceAlpha(), which can premultiply the pixels of a surface in-place.
2024-07-17 18:04:16 -07:00
Frank Praznik
b99ea1ff75
wayland: Add SDL_VIDEO_DOUBLE_BUFFER support
...
Manual cherry-pick of 9e6b8d56e3
thanks @vanfanel
2024-07-17 18:27:46 -04:00
Sam Lantinga
5f5e91eab6
Reverted 3d2e5a0b66
...
Applying these changes to external code doesn't actually improve anything, and within the context of the other Get* functions for renderers and surfaces, these stand out as outliers, so I'm going to back this change out.
2024-07-17 10:27:37 -07:00
Sam Lantinga
8c25129458
SDL_EVENT_WINDOW_LAST should be SDL_EVENT_WINDOW_HDR_STATE_CHANGED
...
Fixes https://github.com/libsdl-org/SDL/issues/10299
2024-07-16 22:43:02 -07:00
SDL Wiki Bot
b92ec25147
Sync SDL3 wiki -> header
2024-07-17 04:33:30 +00:00
Sam Lantinga
3d2e5a0b66
Fixed a few remaining functions to directly return their values instead of an error code.
2024-07-16 21:32:17 -07:00
Sam Lantinga
b7ec2119dd
Use a dither palette when converting RGB images to indexed formats
2024-07-16 17:57:12 -07:00
Sam Lantinga
9ca1792848
Renamed driverdata to internal
...
This was done to SDL_DisplayMode for consistency with SDL_Surface and gives it a type so we don't have to do casts in SDL code.
I considered switching to an ID and hashing the driver data, etc. but all of that involved a lot of internal code churn and this solution gives us flexibility in how we handle this in the future.
After consideration, I made this renaming global across the project, for consistency.
Fixes https://github.com/libsdl-org/SDL/issues/10198
2024-07-16 17:17:13 -07:00
SDL Wiki Bot
fe183872ee
Sync SDL3 wiki -> header
2024-07-16 20:45:34 +00:00
Ryan C. Gordon
4dda785c69
gamepad: Several gamepad mapping functions now follow the SDL_GetStringRule.
...
Reference Issue #10229 .
2024-07-16 16:44:36 -04:00
Ryan C. Gordon
ed1f93cd11
filesystem: SDL_Glob*Directory()
functions now follow the SDL_GetStringRule.
...
Reference Issue #10229 .
2024-07-16 16:44:36 -04:00
Ryan C. Gordon
52bf7ff42d
filesystem: SDL_GetPrefPath() now follows the SDL_GetStringRule.
...
Reference Issue #10229 .
2024-07-16 16:44:36 -04:00
Ryan C. Gordon
2321726ff1
filesystem: SDL_GetUserFolder() now follows the SDL_GetStringRule.
...
It also now caches at the higher level, so the platform-specific bits don't
change their interface much.
Reference Issue #10229 .
2024-07-16 16:44:36 -04:00
Ryan C. Gordon
d40b89dff6
clipboard: SDL_GetPrimarySelectionText() now follows the SDL_GetStringRule.
...
Reference Issue #10229 .
2024-07-16 16:44:36 -04:00
Ryan C. Gordon
158fc459f1
clipboard: SDL_GetClipboardText() now follows the SDL_GetStringRule.
...
Reference Issue #10229 .
2024-07-16 16:44:36 -04:00
Ryan C. Gordon
3bc81a81f5
filesystem: SDL_GetBasePath() now follows the SDL_GetStringRule.
...
It also now caches at the higher level, so the platform-specific bits don't
change their interface much.
A little code hygiene work was applied to some of the platform bits on top of
this.
Reference Issue #10229 .
2024-07-16 16:44:36 -04:00
SDL Wiki Bot
d65a8146b9
Sync SDL3 wiki -> header
2024-07-16 19:03:15 +00:00
Sam Lantinga
4aeabb3c3b
Made event and temporary string memory thread-local and added SDL_FreeEventMemory()
...
Fixes https://github.com/libsdl-org/SDL/issues/10283
2024-07-16 12:01:51 -07:00
Sam Lantinga
ec3bb4c029
Removed the need for SDL_CreateTLS()
...
This eliminates the tap dancing needed for allocating TLS slots, we'll automatically allocate them as needed, in a thread-safe way.
2024-07-16 12:01:51 -07:00
SDL Wiki Bot
70727d36b2
Sync SDL3 wiki -> header
2024-07-16 16:37:08 +00:00
Sam Lantinga
027671bedb
SDL_GetWindowOpacity() directly returns the opacity instead of using an out parameter.
...
Fixes https://github.com/libsdl-org/SDL/issues/10286
2024-07-16 09:36:11 -07:00
Sam Lantinga
58270ef3f2
Finished renaming functions in SDL_system.h
2024-07-16 09:35:49 -07:00
SDL Wiki Bot
4ac67f5ba6
Sync SDL3 wiki -> header
2024-07-16 01:38:55 +00:00
Sam Lantinga
033df70d4c
SDL_DelayNS() will attempt to sleep exactly the requested amount of time
...
This provides a highly accurate sleep function for your application, although you are still subject to being switched out occasionally.
Fixes https://github.com/libsdl-org/SDL/issues/10210
2024-07-15 18:38:09 -07:00