mirror of https://github.com/mgba-emu/mgba.git
VFS: Call msync when syncing mapped data
This commit is contained in:
parent
644bdec47c
commit
9756f79f04
1
CHANGES
1
CHANGES
|
@ -19,6 +19,7 @@ Misc:
|
|||
- GBA Video: Clean up unused timers
|
||||
- Test: Add a basic test suite
|
||||
- GBA Video: Allow multiple handles into the same tile cache
|
||||
- VFS: Call msync when syncing mapped data
|
||||
|
||||
0.5.1: (2016-10-05)
|
||||
Bugfixes:
|
||||
|
|
|
@ -167,6 +167,9 @@ static bool _vfdSync(struct VFile* vf, const void* buffer, size_t size) {
|
|||
struct VFileFD* vfd = (struct VFileFD*) vf;
|
||||
#ifndef _WIN32
|
||||
futimes(vfd->fd, NULL);
|
||||
if (buffer && size) {
|
||||
return msync(buffer, size, MS_SYNC) == 0;
|
||||
}
|
||||
return fsync(vfd->fd) == 0;
|
||||
#else
|
||||
HANDLE h = (HANDLE) _get_osfhandle(vfd->fd);
|
||||
|
|
Loading…
Reference in New Issue