aboutsummaryrefslogtreecommitdiff
path: root/sources/TZR_ReloadResource.c
diff options
context:
space:
mode:
Diffstat (limited to 'sources/TZR_ReloadResource.c')
-rw-r--r--sources/TZR_ReloadResource.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sources/TZR_ReloadResource.c b/sources/TZR_ReloadResource.c
index 1b7ac33..dda5b58 100644
--- a/sources/TZR_ReloadResource.c
+++ b/sources/TZR_ReloadResource.c
@@ -1,5 +1,6 @@
#include "TZR_resource.h"
#include "drain.h"
+#include <errno.h>
#include <sys/stat.h>
int
@@ -7,12 +8,12 @@ TZR_ReloadResource(TZR_Uint id)
{
TZR_Resource *const res = TZR_GetResourcePointer(id);
if (res->path == NULL) {
- fprintf(stderr, "resource path of %u is NULL\n", id);
+ TZR_Log("resource path of %u is NULL", id);
return -1;
}
FILE *const fp = fopen(res->path, "rb");
if (fp == NULL) {
- perror(res->path);
+ TZR_Log("%s: %s", res->path, strerror(errno));
return -1;
}
size_t size;