summaryrefslogtreecommitdiff
path: root/src/windows
diff options
context:
space:
mode:
authorAldrik Ramaekers <aldrik.ramaekers@protonmail.com>2020-03-11 10:29:16 +0100
committerAldrik Ramaekers <aldrik.ramaekers@protonmail.com>2020-03-11 10:29:16 +0100
commit5de96dc1d57d017dd06c6be03260b43154b6fc5e (patch)
tree64142d5604023d673ae36767d1fdbf2d8b408897 /src/windows
parentbbeed51154a8a3782fe50ba9c7d57b13fbaa0bf4 (diff)
work
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;