all repos — mgba @ 877453070780b51fb0cec141f985f9d799240da0

mGBA Game Boy Advance Emulator

PSP2: Sync files per descriptor
Jeffrey Pfau jeffrey@endrift.com
Sat, 13 Aug 2016 19:44:26 -0700
commit

877453070780b51fb0cec141f985f9d799240da0

parent

ac4ae6d4e66b8a03751d634a8ef252ad3372e6f6

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

jump to
M CHANGESCHANGES

@@ -52,6 +52,7 @@ - PSP2: Add fit-to-height screen mode

- GBA Video: Remove old slow path fallback - GBA Video: Optimize sprite drawing - GBA BIOS: Use custom ArcTan, not relying on OS + - PSP2: Sync files per descriptor 0.4.1: (2016-07-11) Bugfixes:
M src/platform/psp2/sce-vfs.csrc/platform/psp2/sce-vfs.c

@@ -76,7 +76,7 @@ }

bool _vfsceClose(struct VFile* vf) { struct VFileSce* vfsce = (struct VFileSce*) vf; - + sceIoSyncByFd(vfsce->fd); return sceIoClose(vfsce->fd) >= 0; }

@@ -112,6 +112,7 @@ struct VFileSce* vfsce = (struct VFileSce*) vf;

SceOff cur = sceIoLseek(vfsce->fd, 0, SEEK_CUR); sceIoWrite(vfsce->fd, memory, size); sceIoLseek(vfsce->fd, cur, SEEK_SET); + sceIoSyncByFd(vfsce->fd); mappedMemoryFree(memory, size); }

@@ -136,8 +137,7 @@ sceIoLseek(vfsce->fd, 0, SEEK_SET);

sceIoWrite(vfsce->fd, buffer, size); sceIoLseek(vfsce->fd, cur, SEEK_SET); } - // TODO: Get the right device - return sceIoSync("ux0:", 0) >= 0; + return sceIoSyncByFd(vfsce->fd) >= 0; } struct VDir* VDirOpen(const char* path) {