From 4323e172facadb0af33c3295e019fcd5d8547ca5 Mon Sep 17 00:00:00 2001 From: kartofen Date: Sat, 25 Nov 2023 15:35:01 +0200 Subject: depth image lets gooo --- src/common.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/common.h') diff --git a/src/common.h b/src/common.h index eaa0743..cfc4a72 100644 --- a/src/common.h +++ b/src/common.h @@ -29,7 +29,7 @@ void *xrealloc(void *ptr, size_t size); #define F_LOAD_FILE_ALIGNED(T) \ static int load_file_##T##_aligned( \ - char *path, size_t *size, u32 *buf) \ + char *path, size_t *size, T *buf) \ { \ int ret = 1; \ \ @@ -41,7 +41,7 @@ void *xrealloc(void *ptr, size_t size); \ fseek(fp, 0, SEEK_END); \ *size = (size_t)ftell(fp); \ - *size += (*size % sizeof(u32)); \ + *size += (*size % sizeof(T)); \ \ if(buf == NULL) { \ ret = 0; \ @@ -49,7 +49,7 @@ void *xrealloc(void *ptr, size_t size); } \ \ fseek(fp, 0, SEEK_SET); \ - fread(buf, sizeof(u32), *size/sizeof(u32), fp); \ + fread(buf, sizeof(T), *size/sizeof(T), fp); \ \ ret = 0; \ exit: \ -- cgit v1.2.3