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
Frank Praznik
6a74ade73d
Make SDL_URIToLocal available to multiple platforms
...
Moves the functions out of core/unix into SDL_utils.c
2024-07-20 12:39:18 -04:00
Ryan C. Gordon
c3bf874abf
stdlib: Clean up and export SDL_UCS4ToUTF8().
...
Also fix internal usage of the function.
Fixes #10157 .
2024-07-04 11:10:50 -04:00
Sam Lantinga
679e4471ed
Added the ability to query the keymap for keycodes based on modifier state
2024-06-21 22:06:08 -07:00
Sam Lantinga
b0e93e4e63
Prevent crashes if freed objects are passed to SDL API functions
...
Instead of using the magic tag in the object, we'll actually keep track of valid objects
Fixes https://github.com/libsdl-org/SDL/issues/9869
Fixes https://github.com/libsdl-org/SDL/issues/9235
2024-06-03 08:54:46 -07:00
Sam Lantinga
c74886ab00
Added SDL_SetWindowAspectRatio() and SDL_GetWindowAspectRatio()
...
Fixes https://github.com/libsdl-org/SDL/issues/1573
2024-05-28 11:52:31 -07:00
Sam Lantinga
5b3ee51c6c
Updated copyright for 2024
2024-01-01 13:15:26 -08:00
meyraud705
9cfac88054
Improve sensor detection for Linux gamepad
2023-06-26 07:32:40 -07:00
Sam Lantinga
6150b5b3cb
Don't bother re-encoding Latin1 characters in the ASCII range
2023-06-04 05:37:06 -07:00
Sam Lantinga
491ae20d96
Only convert the result of XLookupString() if it's not already UTF-8
...
Fixes https://github.com/libsdl-org/SDL/issues/7766
2023-06-04 02:50:03 -07:00
Sam Lantinga
fde78d12f2
Updated copyright for 2023
2023-01-09 09:41:41 -08:00
Sam Lantinga
63724c113b
Removed the vi format comments from the source
...
Vim users can use the [editorconfig plugin](https://github.com/editorconfig/editorconfig-vim ) to automatically set tab spacing for the SDL coding style.
Fixes https://github.com/libsdl-org/SDL/issues/6903
2022-12-26 11:17:23 -08:00
Sam Lantinga
c5790359fd
Added precompiled header support for Visual Studio and Xcode ( #6710 )
...
Fixes https://github.com/libsdl-org/SDL/issues/6704
2022-11-29 18:34:15 -08:00
Sam Lantinga
63f307fe1f
Remove SDL_config.h from the public headers
...
The SDL headers are no longer dependent on the build configuration.
Fixes https://github.com/libsdl-org/SDL/issues/6643 and https://github.com/libsdl-org/SDL/issues/6641
2022-11-26 04:48:36 -08:00
Sam Lantinga
2be9301410
Fixed comment (thanks @pionere!)
2022-07-18 07:18:56 -07:00
Sam Lantinga
b299cb3d3c
Added a utility function to calculate the next power of 2 for a value
2022-07-17 08:31:16 -07:00