From ba99fdcf629eb9d0bbed88c19969fbe1e9929dcc Mon Sep 17 00:00:00 2001 From: Mathieu Eyraud <70028899+meyraud705@users.noreply.github.com> Date: Tue, 21 Apr 2026 23:59:49 +0200 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Sam Lantinga --- include/SDL3/SDL_events.h | 2 +- include/SDL3/SDL_filesystem.h | 2 +- src/filesystem/SDL_sysfilesystem.h | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/SDL3/SDL_events.h b/include/SDL3/SDL_events.h index 9d84574c83..d4bad77202 100644 --- a/include/SDL3/SDL_events.h +++ b/include/SDL3/SDL_events.h @@ -983,7 +983,7 @@ typedef struct SDL_SensorEvent */ typedef struct SDL_FileWatchEvent { - SDL_EventType type; /**< SDL_EVENT_FILE_WATCH_ERROR or SDL_EVENT_FILE_CHANGED */ + SDL_EventType type; /**< SDL_EVENT_FILE_CHANGED or SDL_EVENT_FILE_WATCH_ERROR */ Uint32 reserved; Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */ const char *path; /**< Path of the modified file for SDL_EVENT_FILE_CHANGED, NULL for SDL_EVENT_FILE_WATCH_ERROR */ diff --git a/include/SDL3/SDL_filesystem.h b/include/SDL3/SDL_filesystem.h index 94cb272030..fd5b39180e 100644 --- a/include/SDL3/SDL_filesystem.h +++ b/include/SDL3/SDL_filesystem.h @@ -559,7 +559,7 @@ typedef void (SDLCALL *SDL_FileWatchCallback)(void *userdata, const char *path); * * \sa SDL_FileWatchEvent */ -extern SDL_DECLSPEC bool SDLCALL SDL_WatchFileForChanges(const char *path, SDL_FileWatchCallback callback, void *userdata); +extern SDL_DECLSPEC bool SDLCALL SDL_WatchPathForChanges(const char *path, SDL_FileWatchCallback callback, void *userdata); /* Ends C function definitions when using C++ */ #ifdef __cplusplus diff --git a/src/filesystem/SDL_sysfilesystem.h b/src/filesystem/SDL_sysfilesystem.h index 8b9d1baa13..31eb4fcffb 100644 --- a/src/filesystem/SDL_sysfilesystem.h +++ b/src/filesystem/SDL_sysfilesystem.h @@ -35,8 +35,8 @@ extern bool SDL_SYS_CopyFile(const char *oldpath, const char *newpath); extern bool SDL_SYS_CreateDirectory(const char *path); extern bool SDL_SYS_GetPathInfo(const char *path, SDL_PathInfo *info); -extern bool SDL_SYS_WatchFileForChanges(const char *path, SDL_FileWatchCallback cb, void *userdata); -extern void SDL_SYS_QuitFileWatch(void); +extern bool SDL_SYS_WatchPathForChanges(const char *path, SDL_FileWatchCallback cb, void *userdata); +extern void SDL_SYS_QuitPathWatch(void); typedef bool (*SDL_GlobEnumeratorFunc)(const char *path, SDL_EnumerateDirectoryCallback cb, void *cbuserdata, void *userdata); typedef bool (*SDL_GlobGetPathInfoFunc)(const char *path, SDL_PathInfo *info, void *userdata);