Skip to content

Commit

Permalink
windows: clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
eyelash committed Jan 11, 2024
1 parent f3226e2 commit 086eab1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions gral_windows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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() {
Expand Down

0 comments on commit 086eab1

Please sign in to comment.