Vita: Build fixes

This commit is contained in:
Vicki Pfau 2021-08-30 17:24:54 -07:00
parent 782bc35ad1
commit 02ba8e2480
2 changed files with 4 additions and 4 deletions

View File

@ -3,7 +3,7 @@ include("${VITASDK}/share/vita.cmake" REQUIRED)
find_program(OBJCOPY ${cross_prefix}objcopy)
find_file(NIDDB db.json PATHS ${VITASDK} ${VITASDK}/bin ${VITASDK}/share)
set(OS_DEFINES IOAPI_NO_64)
set(OS_DEFINES IOAPI_NO_64 _GNU_SOURCE)
set(OS_DEFINES ${OS_DEFINES} PARENT_SCOPE)
file(GLOB OS_SRC ${CMAKE_CURRENT_SOURCE_DIR}/psp2-*.c)

View File

@ -90,7 +90,7 @@ struct VFile* VFileOpenSce(const char* path, int flags, SceMode mode) {
bool _vfsceClose(struct VFile* vf) {
struct VFileSce* vfsce = (struct VFileSce*) vf;
sceIoSyncByFd(vfsce->fd);
sceIoSyncByFd(vfsce->fd, 0);
return sceIoClose(vfsce->fd) >= 0;
}
@ -128,7 +128,7 @@ static void _vfsceUnmap(struct VFile* vf, void* memory, size_t size) {
sceIoLseek(vfsce->fd, 0, SEEK_SET);
sceIoWrite(vfsce->fd, memory, size);
sceIoLseek(vfsce->fd, cur, SEEK_SET);
sceIoSyncByFd(vfsce->fd);
sceIoSyncByFd(vfsce->fd, 0);
mappedMemoryFree(memory, size);
}
@ -155,7 +155,7 @@ bool _vfsceSync(struct VFile* vf, void* buffer, size_t size) {
sceIoLseek(vfsce->fd, cur, SEEK_SET);
return res == size;
}
return sceIoSyncByFd(vfsce->fd) >= 0;
return sceIoSyncByFd(vfsce->fd, 0) >= 0;
}
struct VDir* VDirOpen(const char* path) {