(retro_file.c) Vita - cleanups

This commit is contained in:
twinaphex 2015-09-20 10:19:08 +02:00
parent 49ec5a08d2
commit 864dd33e0d

View File

@ -22,6 +22,11 @@
#elif defined(VITA)
# include <psp2/io/fcntl.h>
# include <psp2/io/dirent.h>
#define PSP_O_RDWR PSP2_O_RDWR
#define PSP_O_CREAT PSP2_O_CREAT
#define PSP_O_WRONLY PSP2_O_WRONLY
#define PSP_O_TRUNC PSP2_O_TRUNC
#else
# if defined(PSP)
# include <pspiofilemgr.h>
@ -89,11 +94,7 @@ RFILE *retro_fopen(const char *path, unsigned mode, ssize_t len)
case RFILE_MODE_READ:
#if defined(VITA) || defined(PSP)
mode_int = 0777;
#if defined(VITA)
flags = PSP2_O_RDONLY;
#else
flags = O_RDONLY;
#endif
flags = PSP_O_RDONLY;
#elif defined(HAVE_BUFFERED_IO)
mode_str = "rb";
#else
@ -103,11 +104,7 @@ RFILE *retro_fopen(const char *path, unsigned mode, ssize_t len)
case RFILE_MODE_WRITE:
#if defined(VITA) || defined(PSP)
mode_int = 0777;
#if defined(VITA)
flags = PSP2_O_CREAT | PSP2_O_WRONLY | PSP2_O_TRUNC;
#else
flags = O_WRONLY | O_CREAT;
#endif
flags = PSP_O_CREAT | PSP_O_WRONLY | PSP_O_TRUNC;
#elif defined(HAVE_BUFFERED_IO)
mode_str = "wb";
#else
@ -117,11 +114,7 @@ RFILE *retro_fopen(const char *path, unsigned mode, ssize_t len)
case RFILE_MODE_READ_WRITE:
#if defined(VITA) || defined(PSP)
mode_int = 0777;
#if defined(VITA)
flags = PSP2_O_RDWR;
#else
flags = O_RDWR;
#endif
flags = PSP_O_RDWR;
#elif defined(HAVE_BUFFERED_IO)
mode_str = "w+";
#else