mirror of https://github.com/mgba-emu/mgba.git
PSP2, 3DS: Writeback when unmapping memory
This commit is contained in:
parent
41452ec4e6
commit
376ccd4a30
|
@ -137,7 +137,9 @@ static void* _vf3dMap(struct VFile* vf, size_t size, int flags) {
|
|||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
|
@ -104,7 +104,8 @@ static void* _vfsceMap(struct VFile* vf, size_t size, int flags) {
|
|||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue