Apply suggestions from code review

Co-authored-by: Sam Lantinga <slouken@libsdl.org>
This commit is contained in:
Mathieu Eyraud 2026-04-21 23:59:49 +02:00 committed by GitHub
parent 7b8d6155cc
commit ba99fdcf62
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 4 additions and 4 deletions

View file

@ -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 */

View file

@ -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

View file

@ -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);