mirror of https://github.com/mgba-emu/mgba.git
PSP2: Fix mapping/unmapping from not at 0
This commit is contained in:
parent
7212854cdd
commit
39d9c7efd1
1
CHANGES
1
CHANGES
|
@ -23,6 +23,7 @@ Bugfixes:
|
|||
- 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
|
||||
|
|
|
@ -101,6 +101,7 @@ static void* _vfsceMap(struct VFile* vf, size_t size, int 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* _vfsceMap(struct VFile* vf, size_t size, int flags) {
|
|||
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);
|
||||
|
|
Loading…
Reference in New Issue