mirror of https://github.com/mgba-emu/mgba.git
Merge branch 'port/psp' into port/crucible
This commit is contained in:
commit
ce7088e17d
|
@ -173,7 +173,7 @@ bool GBADeserialize(struct GBA* gba, const struct GBASerializedState* state) {
|
|||
return true;
|
||||
}
|
||||
|
||||
#if !defined(_3DS) && !defined(PSP)
|
||||
#ifndef _3DS
|
||||
struct VFile* GBAGetState(struct GBA* gba, struct VDir* dir, int slot, bool write) {
|
||||
char suffix[5] = { '\0' };
|
||||
snprintf(suffix, sizeof(suffix), ".ss%d", slot);
|
||||
|
@ -251,7 +251,7 @@ static bool _loadPNGState(struct GBA* gba, struct VFile* vf) {
|
|||
}
|
||||
#endif
|
||||
|
||||
#if !defined(_3DS) && !defined(PSP)
|
||||
#ifndef _3DS
|
||||
bool GBASaveState(struct GBAThread* threadContext, struct VDir* dir, int slot, bool screenshot) {
|
||||
struct VFile* vf = GBAGetState(threadContext->gba, dir, slot, true);
|
||||
if (!vf) {
|
||||
|
|
|
@ -23,10 +23,6 @@ static void _vfsceUnmap(struct VFile* vf, void* memory, size_t size);
|
|||
static void _vfsceTruncate(struct VFile* vf, size_t size);
|
||||
static ssize_t _vfsceSize(struct VFile* vf);
|
||||
|
||||
struct VFile* VFileOpen(const char* path, int flags) {
|
||||
return VFileOpenSce(path, flags, 0666);
|
||||
}
|
||||
|
||||
struct VFile* VFileOpenSce(const char* path, int flags, SceMode mode) {
|
||||
struct VFileSce* vfsce = malloc(sizeof(struct VFileSce));
|
||||
if (!vfsce) {
|
||||
|
|
|
@ -5,6 +5,10 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
#include "vfs.h"
|
||||
|
||||
#ifdef PSP
|
||||
#include "platform/psp/sce-vfs.h"
|
||||
#endif
|
||||
|
||||
struct VFile* VFileOpen(const char* path, int flags) {
|
||||
#ifdef USE_VFS_FILE
|
||||
const char* chflags;
|
||||
|
@ -30,6 +34,8 @@ struct VFile* VFileOpen(const char* path, int flags) {
|
|||
break;
|
||||
}
|
||||
return VFileFOpen(path, chflags);
|
||||
#elif defined(PSP)
|
||||
return VFileOpenSce(path, flags, 0666);
|
||||
#else
|
||||
return VFileOpenFD(path, flags);
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue