all repos — mgba @ 39d9c7efd15a333f3bcbe64573ee27445d951ea0

mGBA Game Boy Advance Emulator

PSP2: Fix mapping/unmapping from not at 0
Jeffrey Pfau jeffrey@endrift.com
Mon, 15 Aug 2016 22:11:53 -0700
commit

39d9c7efd15a333f3bcbe64573ee27445d951ea0

parent

7212854cdd33c1fc273cd9d451a538f4e7724e7a

2 files changed, 3 insertions(+), 0 deletions(-)

jump to
M CHANGESCHANGES

@@ -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.csrc/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);