You can pass NULL to SDL_GetPathInfo() and SDL_GetStoragePathInfo() to test for the existence of a file.
This commit is contained in:
1 parent
ebb6582534
commit
92d01ef12a
4 files changed
+22
-8
No files matched your search
@@ -290,6 +290,13 @@ int SDL_RenameStoragePath(SDL_Storage *storage, const char *oldpath, const char
|
||||
|
||||
int SDL_GetStoragePathInfo(SDL_Storage *storage, const char *path, SDL_PathInfo *info)
|
||||
{
|
||||
SDL_PathInfo dummy;
|
||||
|
||||
if (!info) {
|
||||
info = &dummy;
|
||||
}
|
||||
SDL_zerop(info);
|
||||
|
||||
CHECK_STORAGE_MAGIC()
|
||||
|
||||
if (!path) {
|
||||
|
||||
Reference in new issue
Block a user