diff options
| author | Aldrik Ramaekers <aldrik.ramaekers@protonmail.com> | 2020-03-11 10:29:16 +0100 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrik.ramaekers@protonmail.com> | 2020-03-11 10:29:16 +0100 |
| commit | 5de96dc1d57d017dd06c6be03260b43154b6fc5e (patch) | |
| tree | 64142d5604023d673ae36767d1fdbf2d8b408897 /src/windows | |
| parent | bbeed51154a8a3782fe50ba9c7d57b13fbaa0bf4 (diff) | |
work
Diffstat (limited to 'src/windows')
| -rw-r--r-- | src/windows/platform.c | 12 |
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;
|
