From 4e09e58f62e95a66125dae9ddd3e302603819ffd Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" <[EMAIL REDACTED]>
Date: Thu, 26 Sep 2024 16:39:35 -0400
Subject: [PATCH] include: Small clarification on directory enumeration
documentation.
---
include/SDL3/SDL_filesystem.h | 4 ++++
include/SDL3/SDL_storage.h | 4 ++++
2 files changed, 8 insertions(+)
diff --git a/include/SDL3/SDL_filesystem.h b/include/SDL3/SDL_filesystem.h
index 58d86efe14ac4..cdbde2924b506 100644
--- a/include/SDL3/SDL_filesystem.h
+++ b/include/SDL3/SDL_filesystem.h
@@ -272,6 +272,10 @@ typedef int (SDLCALL *SDL_EnumerateDirectoryCallback)(void *userdata, const char
* callback, called once for each directory entry, until all results have been
* provided or the callback returns <= 0.
*
+ * This will return false if there was a system problem in general, or if a
+ * callback returns -1. A successful return means a callback returned 1 to
+ * halt enumeration, or all directory entries were enumerated.
+ *
* \param path the path of the directory to enumerate.
* \param callback a function that is called for each entry in the directory.
* \param userdata a pointer that is passed to `callback`.
diff --git a/include/SDL3/SDL_storage.h b/include/SDL3/SDL_storage.h
index 243046d0eb12b..9edbcf8e4f8cf 100644
--- a/include/SDL3/SDL_storage.h
+++ b/include/SDL3/SDL_storage.h
@@ -320,6 +320,10 @@ extern SDL_DECLSPEC bool SDLCALL SDL_CreateStorageDirectory(SDL_Storage *storage
* callback, called once for each directory entry, until all results have been
* provided or the callback returns <= 0.
*
+ * This will return false if there was a system problem in general, or if a
+ * callback returns -1. A successful return means a callback returned 1 to
+ * halt enumeration, or all directory entries were enumerated.
+ *
* \param storage a storage container.
* \param path the path of the directory to enumerate.
* \param callback a function that is called for each entry in the directory.