summaryrefslogtreecommitdiff
path: root/src/windows
diff options
context:
space:
mode:
Diffstat (limited to 'src/windows')
-rw-r--r--src/windows/platform.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/windows/platform.c b/src/windows/platform.c
index 8c3abe7..3d6c7dd 100644
--- a/src/windows/platform.c
+++ b/src/windows/platform.c
@@ -780,6 +780,18 @@ void platform_window_swap_buffers(platform_window *window)
SwapBuffers(window->hdc);
}
+s32 platform_get_file_size(char *path)
+{
+ FILE *file = fopen(path, "r");
+ if (!file) return -1;
+
+ fseek(file, 0 , SEEK_END);
+ int length = ftell(file);
+ fseek(file, 0, SEEK_SET);
+
+ return length;
+}
+
file_content platform_read_file_content(char *path, const char *mode)
{
file_content result;