Sam Lantinga
b5ad74998b
Removed SDL_DECLSPEC_FREE
2024-07-28 07:24:21 -07: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
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
Sam Lantinga
033c9c5951
Added SDL_CopyFile() and SDL_CopyStorageFile()
...
Fixes https://github.com/libsdl-org/SDL/issues/9553
2024-07-21 19:58:23 -07:00
SDL Wiki Bot
975457cfb6
Sync SDL3 wiki -> header
2024-07-19 19:23:24 +00:00
Sam Lantinga
71a60d4c0e
Updated documentation for functions that return temporary memory
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
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
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
51902d4ac5
Updated headers with latest wikiheaders tweaks.
2024-06-14 02:09:55 -04:00
Sam Lantinga
6f2621438a
Renamed DECLSPEC to SDL_DECLSPEC
2024-05-17 17:09:09 -07:00
Ryan C. Gordon
5e6d85b8f0
wikiheaders: bridge wiki Category docs to the headers!
...
Did an initial cleanup on the headers and wrote a few pieces of documentation,
but this needs more work to fill out the documentation.
2024-05-16 11:48:23 -04:00
Sam Lantinga
863a9029ae
Added SDL_GlobFlags
2024-05-14 07:13:35 -07:00
SDL Wiki Bot
10c2682647
Sync SDL3 wiki -> header
2024-05-03 02:54:35 +00:00
Ryan C. Gordon
760d7d276b
include: Filled in some missing documentation.
2024-05-02 22:53:08 -04:00
Ryan C. Gordon
7a36504952
storage: SDL_WriteStorageFile() wasn't marked as SDLCALL.
...
Fixes #9594 .
2024-04-21 09:26:07 -04:00
Petar Popovic
3f8dba3713
Including SD_error.h into headers with error-returning functions
2024-04-04 11:12:58 -07:00
SDL Wiki Bot
1a97d1f649
Sync SDL3 wiki -> header
2024-04-04 14:42:26 +00:00
Sam Lantinga
0abdc1a343
Renamed GLOBDIR to GLOB
2024-04-04 07:40:48 -07:00
SDL Wiki Bot
ac372e99fe
Sync SDL3 wiki -> header
2024-04-04 13:41:27 +00:00
Ryan C. Gordon
764207d873
filesystem: Added SDL_GlobDirectory() and SDL_GlobStorageDirectory().
...
Fixes #9287 .
2024-04-04 09:40:13 -04:00
SDL Wiki Bot
0d0aaa2d75
Sync SDL3 wiki -> header
2024-03-18 15:57:23 +00:00
Sam Lantinga
92d01ef12a
You can pass NULL to SDL_GetPathInfo() and SDL_GetStoragePathInfo() to test for the existence of a file.
2024-03-18 08:56:24 -07:00
Sam Lantinga
d8a54cd4f8
Updated "see also" references to be more consistent
...
Fixes https://github.com/libsdl-org/SDL/issues/9282
2024-03-17 12:28:11 -07:00
SDL Wiki Bot
a206e1e3c0
Sync SDL3 wiki -> header
2024-03-17 15:40:25 +00:00
Sam Lantinga
f460f42e70
Added filesystem operations to SDL_Storage
2024-03-17 08:39:43 -07:00
Sam Lantinga
ec3ba387d1
Added SDL_OpenFileStorage() for local file storage
2024-03-17 08:39:43 -07:00
Sam Lantinga
fe5c34d4bd
Renamed storage functions to match SDL 3.0 naming convention
2024-03-17 08:39:43 -07:00
SDL Wiki Bot
9ccde0def4
Sync SDL3 wiki -> header
2024-03-16 14:20:24 +00:00
Ethan Lee
744227e6ab
Add SDL_storage
2024-03-16 07:19:50 -07:00