mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-11-12 05:18:40 +00:00
filesystem: SDL_SYS_EnumerateDirectory() now returns bool.
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
#include "../../core/windows/SDL_windows.h"
|
||||
#include "../SDL_sysfilesystem.h"
|
||||
|
||||
int SDL_SYS_EnumerateDirectory(const char *path, const char *dirname, SDL_EnumerateDirectoryCallback cb, void *userdata)
|
||||
bool SDL_SYS_EnumerateDirectory(const char *path, const char *dirname, SDL_EnumerateDirectoryCallback cb, void *userdata)
|
||||
{
|
||||
int result = 1;
|
||||
if (*path == '\0') { // if empty (completely at the root), we need to enumerate drive letters.
|
||||
@@ -88,7 +88,7 @@ int SDL_SYS_EnumerateDirectory(const char *path, const char *dirname, SDL_Enumer
|
||||
FindClose(dir);
|
||||
}
|
||||
|
||||
return result;
|
||||
return (result >= 0);
|
||||
}
|
||||
|
||||
bool SDL_SYS_RemovePath(const char *path)
|
||||
|
||||
Reference in New Issue
Block a user