Sam Lantinga
9da58e9fb7
Fixed storing a key in the persistent string hashtable that's about to be freed
2024-07-27 09:35:22 -07: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
Sam Lantinga
71d2662a39
Fixed warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
2024-07-20 11:50:27 -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
76e5aa5bfd
Log any leaked objects at shutdown
2024-06-03 08:54:46 -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
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
53e685168d
Fixed declaration-after-statement warning
2022-07-18 07:31:23 -07:00
Sam Lantinga
6ad7fdecce
Fixed infinite loop for values bigger than 0x40000000
...
Fixes https://github.com/libsdl-org/SDL/issues/5930
2022-07-18 07:26:29 -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