filesystem: Check SDL_GetPrefPath parameters at the higher level.

...so the backends don't have to do it.

Also added a stern warning about `org` being omitted, but leaving it as
allowed so as not to break existing apps (more than they are already broken,
at least).

Fixes #13322.
This commit is contained in:
Ryan C. Gordon
2025-07-22 12:28:01 -04:00
parent 279a50cc26
commit af1c05fd58
13 changed files with 22 additions and 102 deletions

View File

@@ -134,6 +134,12 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetBasePath(void);
* - ...only use letters, numbers, and spaces. Avoid punctuation like "Game
* Name 2: Bad Guy's Revenge!" ... "Game Name 2" is sufficient.
*
* Due to historical mistakes, `org` is allowed to be NULL or "". In such
* cases, SDL will omit the org subdirectory, including on platforms where it
* shouldn't, and including on platforms where this would make your app fail
* certification for an app store. New apps should definitely specify a real
* string for `org`.
*
* The returned path is guaranteed to end with a path separator ('\\' on
* Windows, '/' on most other platforms).
*