PSP2: Fix mapping/unmapping from not at 0
Jeffrey Pfau jeffrey@endrift.com
Mon, 15 Aug 2016 22:11:53 -0700
2 files changed,
3 insertions(+),
0 deletions(-)
M
CHANGES
→
CHANGES
@@ -23,6 +23,7 @@ - PSP2: Fix gyroscope direction
- Qt: Fix hanging key press after disabling autofire - PSP2: Delete threads after they return - GBA Video: WIN0/1 take priority over OBJWIN + - PSP2: Fix mapping/unmapping from not at 0 Misc: - 3DS: Use blip_add_delta_fast for a small speed improvement - OpenGL: Log shader compilation failure
M
src/platform/psp2/sce-vfs.c
→
src/platform/psp2/sce-vfs.c
@@ -101,6 +101,7 @@ UNUSED(flags);
void* buffer = anonymousMemoryMap(size); if (buffer) { SceOff cur = sceIoLseek(vfsce->fd, 0, SEEK_CUR); + sceIoLseek(vfsce->fd, 0, SEEK_SET); sceIoRead(vfsce->fd, buffer, size); sceIoLseek(vfsce->fd, cur, SEEK_SET); }@@ -110,6 +111,7 @@
static void _vfsceUnmap(struct VFile* vf, void* memory, size_t size) { struct VFileSce* vfsce = (struct VFileSce*) vf; SceOff cur = sceIoLseek(vfsce->fd, 0, SEEK_CUR); + sceIoLseek(vfsce->fd, 0, SEEK_SET); sceIoWrite(vfsce->fd, memory, size); sceIoLseek(vfsce->fd, cur, SEEK_SET); sceIoSyncByFd(vfsce->fd);