diff --git a/CHANGES b/CHANGES index 7a7285bd5..b22181c15 100644 --- a/CHANGES +++ b/CHANGES @@ -33,6 +33,7 @@ Emulation fixes: - GBA Video: Fix Hblank timing (fixes mgba.io/i/2131, mgba.io/i/2310) - GBA Video: Fix rare crash in modes 3-5 Other fixes: + - 3DS: Ensure writes update file modification time (fixes mgba.io/i/2444) - Core: Don't attempt to restore rewind diffs past start of rewind - FFmpeg: Fix crash when encoding audio with some containers - FFmpeg: Fix GIF recording (fixes mgba.io/i/2393) diff --git a/src/platform/3ds/3ds-vfs.c b/src/platform/3ds/3ds-vfs.c index 587ac5944..5b6a8c9eb 100644 --- a/src/platform/3ds/3ds-vfs.c +++ b/src/platform/3ds/3ds-vfs.c @@ -126,7 +126,7 @@ ssize_t _vf3dRead(struct VFile* vf, void* buffer, size_t size) { ssize_t _vf3dWrite(struct VFile* vf, const void* buffer, size_t size) { struct VFile3DS* vf3d = (struct VFile3DS*) vf; u32 sizeWritten; - Result res = FSFILE_Write(vf3d->handle, &sizeWritten, vf3d->offset, buffer, size, FS_WRITE_FLUSH); + Result res = FSFILE_Write(vf3d->handle, &sizeWritten, vf3d->offset, buffer, size, FS_WRITE_FLUSH | FS_WRITE_UPDATE_TIME); if (res) { return -1; } @@ -148,7 +148,7 @@ static void* _vf3dMap(struct VFile* vf, size_t size, int flags) { static void _vf3dUnmap(struct VFile* vf, void* memory, size_t size) { struct VFile3DS* vf3d = (struct VFile3DS*) vf; u32 sizeWritten; - FSFILE_Write(vf3d->handle, &sizeWritten, 0, memory, size, FS_WRITE_FLUSH); + FSFILE_Write(vf3d->handle, &sizeWritten, 0, memory, size, FS_WRITE_FLUSH | FS_WRITE_UPDATE_TIME); mappedMemoryFree(memory, size); } @@ -168,7 +168,7 @@ static bool _vf3dSync(struct VFile* vf, void* buffer, size_t size) { struct VFile3DS* vf3d = (struct VFile3DS*) vf; if (buffer) { u32 sizeWritten; - Result res = FSFILE_Write(vf3d->handle, &sizeWritten, 0, buffer, size, FS_WRITE_FLUSH); + Result res = FSFILE_Write(vf3d->handle, &sizeWritten, 0, buffer, size, FS_WRITE_FLUSH | FS_WRITE_UPDATE_TIME); return R_SUCCEEDED(res); } FSFILE_Flush(vf3d->handle);