filesystem: SDL_EnumerateDirectoryCallback uses an enum now, not an int.

Fixes #10955.
This commit is contained in:
Ryan C. Gordon committed 2024-09-28 01:33:40 -04:00
1 parent 55bd9f5311
commit 7d21a49c9c
5 files changed
+53 -22

No files matched your search

+3 -3
View File
@@ -15,7 +15,7 @@
#include <SDL3/SDL_main.h>
#include <SDL3/SDL_test.h>
static int SDLCALL enum_callback(void *userdata, const char *origdir, const char *fname)
static SDL_EnumerationResult SDLCALL enum_callback(void *userdata, const char *origdir, const char *fname)
{
SDL_PathInfo info;
char *fullpath = NULL;
@@ -29,7 +29,7 @@ static int SDLCALL enum_callback(void *userdata, const char *origdir, const char
if (SDL_asprintf(&fullpath, "%s%s%s", origdir, *origdir ? pathsep : "", fname) < 0) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Out of memory!");
return -1;
return SDL_ENUM_FAILURE;
}
if (!SDL_GetPathInfo(fullpath, &info)) {
@@ -54,7 +54,7 @@ static int SDLCALL enum_callback(void *userdata, const char *origdir, const char
}
SDL_free(fullpath);
return 1; /* keep going */
return SDL_ENUM_CONTINUE; /* keep going */
}