From 63eb46698b1e19d3f36944992b948c54a7a3740b Mon Sep 17 00:00:00 2001 From: Mitja Felicijan Date: Tue, 28 Apr 2026 07:50:31 +0200 Subject: Compiler settings and macOS port --- libraries/vfs.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'libraries/vfs.h') diff --git a/libraries/vfs.h b/libraries/vfs.h index 6a243cc..6017407 100644 --- a/libraries/vfs.h +++ b/libraries/vfs.h @@ -57,28 +57,28 @@ void vfs_init(const char* pak_path) { const char* debug_env = getenv("DEBUG"); if (debug_env && (strcmp(debug_env, "1") == 0 || strcmp(debug_env, "true") == 0)) { g_disk_mode = 1; - log_message(stdout, LOG_INFO, "VFS: Operating in Disk Mode (DEBUG enabled)"); + TraceLog(LOG_INFO, "VFS: Operating in Disk Mode (DEBUG enabled)"); return; } FILE* f = fopen(pak_path, "rb"); if (!f) { - log_message(stderr, LOG_ERROR, "VFS: Failed to open pak file: %s (Error: %s)", pak_path, strerror(errno)); - log_message(stderr, LOG_WARN, "VFS: Falling back to Disk Mode"); + TraceLog(LOG_ERROR, "VFS: Failed to open pak file: %s (Error: %s)", pak_path, strerror(errno)); + TraceLog(LOG_WARNING, "VFS: Falling back to Disk Mode"); g_disk_mode = 1; return; } VfsHeader header; if (fread(&header, sizeof(VfsHeader), 1, f) != 1) { - log_message(stderr, LOG_ERROR, "VFS: Failed to read header from %s", pak_path); + TraceLog(LOG_ERROR, "VFS: Failed to read header from %s", pak_path); fclose(f); g_disk_mode = 1; return; } if (memcmp(header.magic, "DRP1", 4) != 0) { - log_message(stderr, LOG_ERROR, "VFS: Invalid magic in %s", pak_path); + TraceLog(LOG_ERROR, "VFS: Invalid magic in %s", pak_path); fclose(f); g_disk_mode = 1; return; @@ -87,7 +87,7 @@ void vfs_init(const char* pak_path) { g_num_entries = header.num_files; g_entries = (VfsEntry*)malloc(sizeof(VfsEntry) * g_num_entries); if (fread(g_entries, sizeof(VfsEntry), g_num_entries, f) != g_num_entries) { - log_message(stderr, LOG_ERROR, "VFS: Failed to read index table from %s", pak_path); + TraceLog(LOG_ERROR, "VFS: Failed to read index table from %s", pak_path); free(g_entries); g_entries = NULL; fclose(f); @@ -97,7 +97,7 @@ void vfs_init(const char* pak_path) { fclose(f); strncpy(g_pak_path, pak_path, sizeof(g_pak_path) - 1); - log_message(stdout, LOG_INFO, "VFS: Loaded %u files from %s", g_num_entries, pak_path); + TraceLog(LOG_INFO, "VFS: Loaded %u files from %s", g_num_entries, pak_path); } void vfs_shutdown(void) { @@ -137,7 +137,7 @@ VfsFile* vfs_open(const char* path) { } } - log_message(stderr, LOG_WARN, "VFS: File not found: %s", path); + TraceLog(LOG_WARNING, "VFS: File not found: %s", path); return NULL; } -- cgit v1.2.3