mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-11-13 13:58:50 +00:00
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:
@@ -110,14 +110,6 @@ char *SDL_SYS_GetPrefPath(const char *org, const char *app)
|
||||
size_t new_wpath_len = 0;
|
||||
BOOL api_result = FALSE;
|
||||
|
||||
if (!app) {
|
||||
SDL_InvalidParamError("app");
|
||||
return NULL;
|
||||
}
|
||||
if (!org) {
|
||||
org = "";
|
||||
}
|
||||
|
||||
hr = SHGetFolderPathW(NULL, CSIDL_APPDATA | CSIDL_FLAG_CREATE, NULL, 0, path);
|
||||
if (!SUCCEEDED(hr)) {
|
||||
WIN_SetErrorFromHRESULT("Couldn't locate our prefpath", hr);
|
||||
|
||||
Reference in New Issue
Block a user