-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Open
Description
Currently, SDL has SDL_GetPrefPath
to get the path of a general-purpose writable directory, that returns:
%APPDATA%\Roaming\CompanyName\AppName
on Windows~/Library/Application Support/AppName
on macOS~/.local/share/AppName
on Linux/XDG/data/data/AppName/files
on Android
It would also be handy to get more specific paths, like for storing cache data:
%APPDATA%\Local\CompanyName\AppName
on Windows (I think so anyway, I'm not experienced here)~/Library/Cache/AppName
on macOS~/.cache/AppName
on Linux/XDG/data/data/AppName/cache
on Android (exposed throughSDL_GetAndroidCachePath
in SDL)
or preferences or configuration data:
~/Library/Preferences/AppName
on macOS~/.config/AppName
on Linux/XDG- (I think there is none on Windows because you're expected to use the registry for that)
SDL also has SDL_GetUserFolder
that these could be added to, but SDL_GetUserFolder
is currently just for user-visible folders like Documents and Downloads, whereas the cache and prefs are hidden by default in the OSs listed above. A new API for this could help fix #4447 and make #3336 more explicit/transparent.
Metadata
Metadata
Assignees
Labels
No labels