From 0851e8f9bbc53e346722433e6a37a54b6a285b2d Mon Sep 17 00:00:00 2001 From: Aetias Date: Fri, 23 Feb 2024 19:48:14 +0100 Subject: [PATCH] Use `HANDLE` instead of `HFILE` --- tools/include/util.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/include/util.h b/tools/include/util.h index d1cc32fe..4c5b7d4a 100644 --- a/tools/include/util.h +++ b/tools/include/util.h @@ -69,7 +69,7 @@ bool ChangeDir(const char *dir) { typedef struct { const char *name; #ifdef __UTIL_WINDOWS - HFILE handle; + HANDLE handle; #elif defined(__UTIL_LINUX) FILE *fp; #endif @@ -77,7 +77,7 @@ typedef struct { bool FileOpenRead(const char *name, File *file) { #ifdef __UTIL_WINDOWS - HFILE handle = CreateFileA(name, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + HANDLE handle = CreateFileA(name, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); if (handle != INVALID_HANDLE_VALUE) { file->name = name; file->handle = handle; @@ -96,7 +96,7 @@ bool FileOpenRead(const char *name, File *file) { bool FileOpenWrite(const char *name, File *file) { #ifdef __UTIL_WINDOWS - HFILE handle = CreateFileA(name, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); + HANDLE handle = CreateFileA(name, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); if (handle != INVALID_HANDLE_VALUE) { file->name = name; file->handle = handle;