Commit c7158c1a authored by Libretro-Admin's avatar Libretro-Admin
Browse files

Update

parent fdc6a2f5
......@@ -130,26 +130,12 @@ else ifeq ($(platform), qnx)
CC_AS = qcc -Vgcc_ntoarmv7le
AR = QCC -Vgcc_ntoarmv7le
PLATFORM_DEFINES := -D__BLACKBERRY_QNX__ -fexceptions -marm -mcpu=cortex-a9 -mfpu=neon -mfloat-abi=softfp
else ifeq ($(platform), ps3)
TARGET := $(TARGET_NAME)_libretro_$(platform).a
CC = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-gcc.exe
CC_AS = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-gcc.exe
AR = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ar.exe
PLATFORM_DEFINES := -D__CELLOS_LV2__ -DMSB_FIRST
STATIC_LINKING = 1
else ifeq ($(platform), sncps3)
TARGET := $(TARGET_NAME)_libretro_ps3.a
CC = $(CELL_SDK)/host-win32/sn/bin/ps3ppusnc.exe
CC_AS = $(CELL_SDK)/host-win32/sn/bin/ps3ppusnc.exe
AR = $(CELL_SDK)/host-win32/sn/bin/ps3snarl.exe
PLATFORM_DEFINES := -D__CELLOS_LV2__ -DMSB_FIRST
STATIC_LINKING = 1
else ifeq ($(platform), psl1ght)
TARGET := $(TARGET_NAME)_libretro_$(platform).a
CC = $(PS3DEV)/ppu/bin/ppu-gcc$(EXE_EXT)
CC_AS = $(PS3DEV)/ppu/bin/ppu-gcc$(EXE_EXT)
AR = $(PS3DEV)/ppu/bin/ppu-ar$(EXE_EXT)
PLATFORM_DEFINES := -D__CELLOS_LV2__ -DMSB_FIRST
PLATFORM_DEFINES := -D__PSL1GHT__ -DMSB_FIRST
STATIC_LINKING = 1
# Classic Platforms ####################
......
#if defined( VITA ) || defined( __CELLOS_LV2__ )
#if defined( VITA )
#include <stddef.h>
......
#if defined( VITA ) || defined( __CELLOS_LV2__ )
#if defined( VITA )
#include <stddef.h>
char* getcwd( char* buf, size_t size );
int chdir( const char* path);
......
......@@ -2550,6 +2550,7 @@ byte LoadFNT(const char *FileName)
/*************************************************************/
byte *LoadROM(const char *Name,int Size,byte *Buf)
{
char path[512];
FILE *F;
byte *P;
int J;
......@@ -2557,23 +2558,20 @@ byte *LoadROM(const char *Name,int Size,byte *Buf)
/* Can't give address without size! */
if(Buf&&!Size) return(0);
#if defined( VITA ) || defined( __CELLOS_LV2__ )
char path[512];
if(!(F=fopen(Name,"rb"))){
strcpy(path,ProgDir);
strcat(path,"/");
strcat(path,Name);
/* Open file */
if(!(F=fopen(path,"rb")))
return(0);
#if defined( VITA )
if(!(F=fopen(Name,"rb")))
{
strcpy(path,ProgDir);
strcat(path,"/");
strcat(path,Name);
/* Open file */
if(!(F=fopen(path,"rb")))
return(0);
}
#else
/* Open file */
if(!(F=fopen(Name,"rb"))) return(0);
if(!(F=fopen(Name,"rb")))
return(0);
#endif
/* Determine data size, if wasn't given */
......
......@@ -71,15 +71,11 @@
#include <kernel/image.h>
#endif
#if defined(__CELLOS_LV2__)
#include <cell/cell_fs.h>
#endif
#if defined(VITA)
#define FIO_S_ISDIR SCE_S_ISDIR
#endif
#if (defined(__CELLOS_LV2__) && !defined(__PSL1GHT__)) || defined(__QNX__) || defined(PSP)
#if defined(__QNX__) || defined(PSP)
#include <unistd.h> /* stat() is defined here */
#endif
......@@ -106,10 +102,6 @@ static bool path_stat(const char *path, enum stat_mode mode, int32_t *size)
}
free(tmp);
#elif defined(__CELLOS_LV2__)
CellFsStat buf;
if (cellFsStat(path, &buf) < 0)
return false;
#elif defined(_WIN32)
struct _stat buf;
DWORD file_info = GetFileAttributes(path);
......@@ -132,15 +124,13 @@ static bool path_stat(const char *path, enum stat_mode mode, int32_t *size)
case IS_DIRECTORY:
#if defined(VITA) || defined(PSP)
return FIO_S_ISDIR(buf.st_mode);
#elif defined(__CELLOS_LV2__)
return ((buf.st_mode & S_IFMT) == S_IFDIR);
#elif defined(_WIN32)
return (file_info & FILE_ATTRIBUTE_DIRECTORY);
#else
return S_ISDIR(buf.st_mode);
#endif
case IS_CHARACTER_SPECIAL:
#if defined(VITA) || defined(PSP) || defined(__CELLOS_LV2__) || defined(_WIN32)
#if defined(VITA) || defined(PSP) || defined(_WIN32)
return false;
#else
return S_ISCHR(buf.st_mode);
......
......@@ -48,8 +48,6 @@ struct RDIR *retro_opendir(const char *name)
#elif defined(_3DS)
rdir->directory = (name && *name)? opendir(name) : NULL;
rdir->entry = NULL;
#elif defined(__CELLOS_LV2__)
rdir->error = cellFsOpendir(name, &rdir->directory);
#else
rdir->directory = opendir(name);
rdir->entry = NULL;
......@@ -64,8 +62,6 @@ bool retro_dirent_error(struct RDIR *rdir)
return (rdir->directory == INVALID_HANDLE_VALUE);
#elif defined(VITA) || defined(PSP)
return (rdir->directory < 0);
#elif defined(__CELLOS_LV2__)
return (rdir->error != CELL_FS_SUCCEEDED);
#else
return !(rdir->directory);
#endif
......@@ -81,10 +77,6 @@ int retro_readdir(struct RDIR *rdir)
return (rdir->directory != INVALID_HANDLE_VALUE);
#elif defined(VITA) || defined(PSP)
return (sceIoDread(rdir->directory, &rdir->entry) > 0);
#elif defined(__CELLOS_LV2__)
uint64_t nread;
rdir->error = cellFsReaddir(rdir->directory, &rdir->entry, &nread);
return (nread != 0);
#else
return ((rdir->entry = readdir(rdir->directory)) != NULL);
#endif
......@@ -94,7 +86,7 @@ const char *retro_dirent_get_name(struct RDIR *rdir)
{
#if defined(_WIN32)
return rdir->entry.cFileName;
#elif defined(VITA) || defined(PSP) || defined(__CELLOS_LV2__)
#elif defined(VITA) || defined(PSP)
return rdir->entry.d_name;
#else
return rdir->entry->d_name;
......@@ -124,9 +116,6 @@ bool retro_dirent_is_dir(struct RDIR *rdir, const char *path)
#elif defined(VITA)
return SCE_S_ISDIR(entry->d_stat.st_mode);
#endif
#elif defined(__CELLOS_LV2__)
CellFsDirent *entry = (CellFsDirent*)&rdir->entry;
return (entry->d_type == CELL_FS_TYPE_DIRECTORY);
#elif defined(DT_DIR)
const struct dirent *entry = (const struct dirent*)rdir->entry;
if (entry->d_type == DT_DIR)
......@@ -151,8 +140,6 @@ void retro_closedir(struct RDIR *rdir)
FindClose(rdir->directory);
#elif defined(VITA) || defined(PSP)
sceIoDclose(rdir->directory);
#elif defined(__CELLOS_LV2__)
rdir->error = cellFsClosedir(rdir->directory);
#else
if (rdir->directory)
closedir(rdir->directory);
......
......@@ -54,10 +54,6 @@
# include <unistd.h>
#endif
#ifdef __CELLOS_LV2__
#include <cell/cell_fs.h>
#endif
RETRO_BEGIN_DECLS
struct RDIR
......@@ -70,10 +66,6 @@ struct RDIR
#elif defined(VITA) || defined(PSP)
SceUID directory;
SceIoDirent entry;
#elif defined(__CELLOS_LV2__)
CellFsErrno error;
int directory;
CellFsDirent entry;
#else
DIR *directory;
const struct dirent *entry;
......
......@@ -69,7 +69,7 @@ extern "C" {
# endif
# endif
# else
# if defined(__GNUC__) && __GNUC__ >= 4 && !defined(__CELLOS_LV2__)
# if defined(__GNUC__) && __GNUC__ >= 4
# define RETRO_API RETRO_CALLCONV __attribute__((__visibility__("default")))
# else
# define RETRO_API RETRO_CALLCONV
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment