all repos — mgba @ f0c8c246cc318f5a3f42bff2c8a7f04b9a03d9e9

mGBA Game Boy Advance Emulator

VFS: Fix Windows build
Jeffrey Pfau jeffrey@endrift.com
Tue, 07 Jul 2015 01:03:36 -0700
commit

f0c8c246cc318f5a3f42bff2c8a7f04b9a03d9e9

parent

4b3df31e4970c2db065e3ed801ef179ce4b9955a

1 files changed, 4 insertions(+), 0 deletions(-)

jump to
M src/util/vfs/vfs-fd.csrc/util/vfs/vfs-fd.c

@@ -173,5 +173,9 @@ static bool _vfdSync(struct VFile* vf, const void* buffer, size_t size) {

UNUSED(buffer); UNUSED(size); struct VFileFD* vfd = (struct VFileFD*) vf; +#ifndef _WIN32 return fsync(vfd->fd) == 0; +#else + return FlushFileBuffers((HANDLE) _get_osfhandle(vfd->fd)); +#endif }