PSP2, 3DS: Writeback when unmapping memory

This commit is contained in:
Jeffrey Pfau 2015-08-30 18:29:20 -07:00
parent 41452ec4e6
commit 376ccd4a30
2 changed files with 5 additions and 2 deletions

View File

@ -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);
}

View File

@ -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);
}