diff options
Diffstat (limited to 'libs/common.h')
-rw-r--r-- | libs/common.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/libs/common.h b/libs/common.h index c373e9a..2fbed3d 100644 --- a/libs/common.h +++ b/libs/common.h @@ -12,6 +12,8 @@ #include <sys/stat.h> #include <fcntl.h> +#include "pwyazh.h" + char *read_entire_file(const char *filename) { char *result = 0; @@ -75,12 +77,19 @@ void *mmap_file(size_t *len, const char *filename) void read_entire_file_mmap(void* ctx, const char* filename, const int is_mtl, const char* obj_filename, char** data, size_t* len) { + if (ctx) { + printf("info: user context was provided, but not processed\n"); + } if (!filename) { fprintf(stderr, "[ERROR]: Filename not provided (null)\n"); *data = 0; *len = 0; return; } + if (is_mtl) + printf("info: %s is material\n", filename); + if (obj_filename) + printf("info: obj_filename %s\n", obj_filename); size_t data_len = 0; @@ -498,7 +507,7 @@ void process_glfw_mouse_pos(GLFWwindow *window, Input *input) void error_callback(int error, const char *desc) { - fprintf(stderr, "[ERROR] GLFW: %s\n", desc); + fprintf(stderr, "[ERROR]: %d %s\n", error, desc); } B32 key_is_pressed(Key key) |