diff --git a/gral_windows.cpp b/gral_windows.cpp index d5ea23d..9013168 100644 --- a/gral_windows.cpp +++ b/gral_windows.cpp @@ -1126,9 +1126,9 @@ void gral_file_write(gral_file *file, void const *buffer, size_t size) { } size_t gral_file_get_size(gral_file *file) { - DWORD size_high; - DWORD size_low = GetFileSize(file, &size_high); - return (DWORD64)size_high << 32 | size_low; + LARGE_INTEGER size; + GetFileSizeEx(file, &size); + return size.QuadPart; } void *gral_file_map(gral_file *file, size_t size) { @@ -1179,7 +1179,7 @@ void gral_directory_remove(char const *path) { static double get_frequency() { LARGE_INTEGER frequency; QueryPerformanceFrequency(&frequency); - return frequency.QuadPart; + return (double)frequency.QuadPart; } double gral_time_get_monotonic() {