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

Update

parent 2a2088c8
Pipeline #6231 passed with stages
in 8 minutes and 35 seconds
......@@ -186,7 +186,7 @@ else ifeq ($(platform), psl1ght)
TARGET := $(TARGET_NAME)_libretro_$(platform).$(EXT)
CC = $(PS3DEV)/ppu/bin/ppu-gcc$(EXE_EXT)
AR = $(PS3DEV)/ppu/bin/ppu-ar$(EXE_EXT)
CFLAGS += -DMSB_FIRST -D__CELLOS_LV2__ -D__PSL1GHT__ -I$(PS3DEV)/ppu/include
CFLAGS += -DMSB_FIRST -D__PSL1GHT__ -I$(PS3DEV)/ppu/include
STATIC_LINKING = 1
# PSP1
......
......@@ -66,9 +66,6 @@ qboolean isDedicated;
#ifdef __PSL1GHT__
#include <lv2/systime.h>
#elif defined (__CELLOS_LV2__)
#include <sys/sys_time.h>
#include <sys/timer.h>
#endif
#define SURFCACHE_SIZE 10485760
......@@ -395,8 +392,6 @@ double Sys_DoubleTime(void)
newtime = ticks_to_microsecs(gettime()) / 1000000.0;
#elif defined(__PSL1GHT__)
newtime = sysGetSystemTime() / 1000000.0;
#elif defined(__CELLOS_LV2__)
newtime = sys_time_get_system_time() / 1000000.0;
#elif defined(_WIN32)
static double pfreq;
static __int64 startcount;
......
......@@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#else
#include <winsock2.h>
#endif
#elif defined(GEKKO) || defined(__CELLOS_LV2__) || defined(_XBOX360)
#elif defined(MSB_FIRST)
// Is already big-endian
#ifndef htons
#define htons(x) (x)
......
......@@ -3336,11 +3336,7 @@ FLAC__StreamDecoderSeekStatus file_seek_callback_(const FLAC__StreamDecoder *dec
if(decoder->private_->file == stdin)
return FLAC__STREAM_DECODER_SEEK_STATUS_UNSUPPORTED;
#ifdef __CELLOS_LV2__
else if(fseek(decoder->private_->file, (FLAC__off_t)absolute_byte_offset, SEEK_SET) < 0)
#else
else if(fseeko(decoder->private_->file, (FLAC__off_t)absolute_byte_offset, SEEK_SET) < 0)
#endif
return FLAC__STREAM_DECODER_SEEK_STATUS_ERROR;
else
return FLAC__STREAM_DECODER_SEEK_STATUS_OK;
......@@ -3353,11 +3349,7 @@ FLAC__StreamDecoderTellStatus file_tell_callback_(const FLAC__StreamDecoder *dec
if(decoder->private_->file == stdin)
return FLAC__STREAM_DECODER_TELL_STATUS_UNSUPPORTED;
#ifdef __CELLOS_LV2__
else if((pos = ftell(decoder->private_->file)) < 0)
#else
else if((pos = ftello(decoder->private_->file)) < 0)
#endif
return FLAC__STREAM_DECODER_TELL_STATUS_ERROR;
else {
*absolute_byte_offset = (FLAC__uint64)pos;
......
......@@ -87,15 +87,11 @@
#include <fileXio.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) || defined(PS2)
#if defined(__QNX__) || defined(PSP) || defined(PS2)
#include <unistd.h> /* stat() is defined here */
#endif
......
......@@ -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
......
......@@ -26,7 +26,7 @@
#include <stdio.h>
#include <stdint.h>
#if defined(__CELLOS_LV2__) || defined(PSP) || defined(PS2) || defined(GEKKO) || defined(VITA) || defined(_XBOX) || defined(_3DS) || defined(WIIU) || defined(SWITCH) || defined(HAVE_LIBNX)
#if defined(PSP) || defined(PS2) || defined(GEKKO) || defined(VITA) || defined(_XBOX) || defined(_3DS) || defined(WIIU) || defined(SWITCH) || defined(HAVE_LIBNX)
/* No mman available */
#elif defined(_WIN32) && !defined(_XBOX)
#include <windows.h>
......
......@@ -116,19 +116,7 @@ struct SceNetInAddr inet_aton(const char *ip_addr);
#include <netdb.h>
#include <fcntl.h>
#if defined(__CELLOS_LV2__) && !defined(__PSL1GHT__)
#include <cell/sysmodule.h>
#include <netex/net.h>
#include <netex/libnetctl.h>
#include <sys/timer.h>
#ifndef EWOULDBLOCK
#define EWOULDBLOCK SYS_NET_EWOULDBLOCK
#endif
#else
#include <signal.h>
#endif
#endif
......@@ -155,8 +143,6 @@ static INLINE bool isagain(int bytes)
if (WSAGetLastError() != WSAEWOULDBLOCK)
return false;
return true;
#elif defined(__CELLOS_LV2__) && !defined(__PSL1GHT__)
return (sys_net_errno == SYS_NET_EWOULDBLOCK) || (sys_net_errno == SYS_NET_EAGAIN);//35
#elif defined(VITA)
return (bytes<0 && (bytes == SCE_NET_ERROR_EAGAIN || bytes == SCE_NET_ERROR_EWOULDBLOCK));
#elif defined(WIIU)
......
......@@ -39,10 +39,6 @@
#include <Xtl.h>
#endif
#if defined(__CELLOS_LV2__) && !defined(__PSL1GHT__)
#include <sys/fs_external.h>
#endif
#include <limits.h>
#ifdef _MSC_VER
......@@ -75,9 +71,7 @@ static INLINE bool bits_any_set(uint32_t* ptr, uint32_t count)
}
#ifndef PATH_MAX_LENGTH
#if defined(__CELLOS_LV2__) && !defined(__PSL1GHT__)
#define PATH_MAX_LENGTH CELL_FS_MAX_FS_PATH_LENGTH
#elif defined(_XBOX1) || defined(_3DS) || defined(PSP) || defined(PS2) || defined(GEKKO)|| defined(WIIU) || defined(ORBIS)
#if defined(_XBOX1) || defined(_3DS) || defined(PSP) || defined(PS2) || defined(GEKKO)|| defined(WIIU) || defined(ORBIS)
#define PATH_MAX_LENGTH 512
#else
#define PATH_MAX_LENGTH 4096
......
......@@ -25,9 +25,7 @@
#include <stdint.h>
#if defined(__CELLOS_LV2__) && !defined(__PSL1GHT__)
#include <sys/timer.h>
#elif defined(XENON)
#if defined(XENON)
#include <time/time.h>
#elif defined(GEKKO) || defined(__PSL1GHT__) || defined(__QNX__)
#include <unistd.h>
......@@ -87,9 +85,7 @@ static int nanosleepDOS(const struct timespec *rqtp, struct timespec *rmtp)
**/
static INLINE void retro_sleep(unsigned msec)
{
#if defined(__CELLOS_LV2__) && !defined(__PSL1GHT__)
sys_timer_usleep(1000 * msec);
#elif defined(PSP) || defined(VITA)
#if defined(PSP) || defined(VITA)
sceKernelDelayThread(1000 * msec);
#elif defined(PS2)
SDL_Delay(msec);
......
......@@ -228,7 +228,7 @@ int getaddrinfo_retro(const char *node, const char *service,
in_addr->sin_family = host->h_addrtype;
#if defined(AF_INET6) && !defined(__CELLOS_LV2__) || defined(VITA)
#if defined(AF_INET6) || defined(VITA)
/* TODO/FIXME - In case we ever want to support IPv6 */
in_addr->sin_addr.s_addr = inet_addr(host->h_addr_list[0]);
#else
......@@ -286,29 +286,6 @@ bool network_init(void)
network_deinit();
return false;
}
#elif defined(__CELLOS_LV2__) && !defined(__PSL1GHT__)
int timeout_count = 10;
cellSysmoduleLoadModule(CELL_SYSMODULE_NET);
sys_net_initialize_network();
if (cellNetCtlInit() < 0)
return false;
for (;;)
{
int state;
if (cellNetCtlGetState(&state) < 0)
return false;
if (state == CELL_NET_CTL_STATE_IPObtained)
break;
retro_sleep(500);
timeout_count--;
if (timeout_count < 0)
return 0;
}
#elif defined(VITA)
SceNetInitParam initparam;
......@@ -356,10 +333,6 @@ void network_deinit(void)
{
#if defined(_WIN32)
WSACleanup();
#elif defined(__CELLOS_LV2__) && !defined(__PSL1GHT__)
cellNetCtlTerm();
sys_net_finalize_network();
cellSysmoduleUnloadModule(CELL_SYSMODULE_NET);
#elif defined(VITA)
sceNetCtlTerm();
sceNetTerm();
......
......@@ -125,7 +125,7 @@ int socket_receive_all_blocking(int fd, void *data_, size_t size)
bool socket_nonblock(int fd)
{
#if defined(__CELLOS_LV2__) || defined(VITA) || defined(WIIU)
#if defined(VITA) || defined(WIIU)
int i = 1;
setsockopt(fd, SOL_SOCKET, SO_NBIO, &i, sizeof(int));
return true;
......@@ -142,7 +142,7 @@ int socket_close(int fd)
#if defined(_WIN32) && !defined(_XBOX360)
/* WinSock has headers from the stone age. */
return closesocket(fd);
#elif defined(__CELLOS_LV2__) || defined(WIIU)
#elif defined(WIIU)
return socketclose(fd);
#elif defined(VITA)
return sceNetSocketClose(fd);
......@@ -154,9 +154,7 @@ int socket_close(int fd)
int socket_select(int nfds, fd_set *readfs, fd_set *writefds,
fd_set *errorfds, struct timeval *timeout)
{
#if defined(__CELLOS_LV2__)
return socketselect(nfds, readfs, writefds, errorfds, timeout);
#elif defined(VITA)
#if defined(VITA)
extern int retro_epoll_fd;
SceNetEpollEvent ev = {0};
......
......@@ -68,16 +68,7 @@
# endif
#endif
#ifdef __CELLOS_LV2__
#include <cell/cell_fs.h>
#define O_RDONLY CELL_FS_O_RDONLY
#define O_WRONLY CELL_FS_O_WRONLY
#define O_CREAT CELL_FS_O_CREAT
#define O_TRUNC CELL_FS_O_TRUNC
#define O_RDWR CELL_FS_O_RDWR
#else
#include <fcntl.h>
#endif
/* TODO: Some things are duplicated but I'm really afraid of breaking other platforms by touching this */
#if defined(VITA)
......@@ -102,7 +93,7 @@
# include <unistd.h>
#endif
#if (defined(__CELLOS_LV2__) && !defined(__PSL1GHT__)) || defined(__QNX__) || defined(PSP) || defined(PS2)
#if defined(__QNX__) || defined(PSP) || defined(PS2)
#include <unistd.h> /* stat() is defined here */
#endif
......@@ -151,15 +142,11 @@
#include <fileXio.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
......@@ -205,7 +192,7 @@ int64_t retro_vfs_file_seek_internal(libretro_vfs_implementation_file *stream, i
/* VC2005 and up have a special 64-bit fseek */
#ifdef ATLEAST_VC2005
return _fseeki64(stream->fp, offset, whence);
#elif defined(__CELLOS_LV2__) || defined(_MSC_VER) && _MSC_VER <= 1310
#elif defined(_MSC_VER) && _MSC_VER <= 1310
return fseek(stream->fp, (long)offset, whence);
#elif defined(PS2)
{
......@@ -947,24 +934,6 @@ int retro_vfs_stat_impl(const char *path, int32_t *size)
return RETRO_VFS_STAT_IS_VALID | (is_dir ? RETRO_VFS_STAT_IS_DIRECTORY : 0) | (is_character_special ? RETRO_VFS_STAT_IS_CHARACTER_SPECIAL : 0);
#elif defined(__CELLOS_LV2__)
/* CellOS Lv2 */
bool is_dir;
bool is_character_special = false;
CellFsStat buf;
if (!path || !*path)
return 0;
if (cellFsStat(path, &buf) < 0)
return 0;
if (size)
*size = (int32_t)buf.st_size;
is_dir = ((buf.st_mode & S_IFMT) == S_IFDIR);
return RETRO_VFS_STAT_IS_VALID | (is_dir ? RETRO_VFS_STAT_IS_DIRECTORY : 0) | (is_character_special ? RETRO_VFS_STAT_IS_CHARACTER_SPECIAL : 0);
#elif defined(_WIN32)
/* Windows */
bool is_dir;
......@@ -1093,10 +1062,6 @@ struct libretro_vfs_implementation_dir
#elif defined(PS2)
int directory;
iox_dirent_t entry;
#elif defined(__CELLOS_LV2__)
CellFsErrno error;
int directory;
CellFsDirent entry;
#elif defined(ORBIS)
int directory;
struct dirent entry;
......@@ -1112,8 +1077,6 @@ static bool dirent_check_error(libretro_vfs_implementation_dir *rdir)
return (rdir->directory == INVALID_HANDLE_VALUE);
#elif defined(VITA) || defined(PSP) || defined(PS2) || defined(ORBIS)
return (rdir->directory < 0);
#elif defined(__CELLOS_LV2__)
return (rdir->error != CELL_FS_SUCCEEDED);
#else
return !(rdir->directory);
#endif
......@@ -1179,8 +1142,6 @@ libretro_vfs_implementation_dir *retro_vfs_opendir_impl(
#elif defined(_3DS)
rdir->directory = !string_is_empty(name) ? opendir(name) : NULL;
rdir->entry = NULL;
#elif defined(__CELLOS_LV2__)
rdir->error = cellFsOpendir(name, &rdir->directory);
#elif defined(ORBIS)
rdir->directory = orbisDopen(name);
#else
......@@ -1221,10 +1182,6 @@ bool retro_vfs_readdir_impl(libretro_vfs_implementation_dir *rdir)
int ret = ps2fileXioDread(rdir->directory, &record);
rdir->entry = record;
return ( ret > 0);
#elif defined(__CELLOS_LV2__)
uint64_t nread;
rdir->error = cellFsReaddir(rdir->directory, &rdir->entry, &nread);
return (nread != 0);
#elif defined(ORBIS)
return (orbisDread(rdir->directory, &rdir->entry) > 0);
#else
......@@ -1255,7 +1212,7 @@ const char *retro_vfs_dirent_get_name_impl(libretro_vfs_implementation_dir *rdir
}
#endif
return (char*)rdir->entry.cFileName;
#elif defined(VITA) || defined(PSP) || defined(__CELLOS_LV2__) || defined(ORBIS)
#elif defined(VITA) || defined(PSP) || defined(ORBIS)
return rdir->entry.d_name;
#elif defined(PS2)
return rdir->entry.name;
......@@ -1281,9 +1238,6 @@ bool retro_vfs_dirent_is_dir_impl(libretro_vfs_implementation_dir *rdir)
#elif defined(PS2)
const iox_dirent_t *entry = (const iox_dirent_t*)&rdir->entry;
return FIO_S_ISDIR(entry->stat.mode);
#elif defined(__CELLOS_LV2__)
CellFsDirent *entry = (CellFsDirent*)&rdir->entry;
return (entry->d_type == CELL_FS_TYPE_DIRECTORY);
#elif defined(ORBIS)
const struct dirent *entry = &rdir->entry;
if (entry->d_type == DT_DIR)
......@@ -1322,8 +1276,6 @@ int retro_vfs_closedir_impl(libretro_vfs_implementation_dir *rdir)
sceIoDclose(rdir->directory);
#elif defined(PS2)
ps2fileXioDclose(rdir->directory);
#elif defined(__CELLOS_LV2__)
rdir->error = cellFsClosedir(rdir->directory);
#elif defined(ORBIS)
orbisDclose(rdir->directory);
#else
......
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