all repos — mgba @ 376ccd4a306a1282cc76f4db8aaff7f88b4d95d1

mGBA Game Boy Advance Emulator

PSP2, 3DS: Writeback when unmapping memory
Jeffrey Pfau jeffrey@endrift.com
Sun, 30 Aug 2015 18:29:20 -0700
commit

376ccd4a306a1282cc76f4db8aaff7f88b4d95d1

parent

41452ec4e6ab7d914409b9ed52fd661a654907d0

2 files changed, 5 insertions(+), 2 deletions(-)

jump to
M src/platform/3ds/3ds-vfs.csrc/platform/3ds/3ds-vfs.c

@@ -137,7 +137,9 @@ return buffer;

} static void _vf3dUnmap(struct VFile* vf, void* memory, size_t size) { - UNUSED(vf); + struct VFile3DS* vf3d = (struct VFile3DS*) vf; + u32 sizeWritten; + FSFILE_Write(vf3d->handle, &sizeWritten, 0, memory, size, FS_WRITE_FLUSH); mappedMemoryFree(memory, size); }
M src/platform/psp2/sce-vfs.csrc/platform/psp2/sce-vfs.c

@@ -104,7 +104,8 @@ return buffer;

} static void _vfsceUnmap(struct VFile* vf, void* memory, size_t size) { - UNUSED(vf); + struct VFileSce* vfsce = (struct VFileSce*) vf; + sceIoWrite(vfsce->fd, memory, size); mappedMemoryFree(memory, size); }