This commit is contained in:
twinaphex 2020-12-20 23:13:45 +01:00
parent 0aad6c601c
commit cbb60eedd9
5 changed files with 20 additions and 27 deletions

View File

@ -185,18 +185,6 @@ else ifeq ($(platform), switch)
WANT_ZLIB=1
STATIC_LINKING=1
else ifeq ($(platform), ps3)
TARGET := $(TARGET_NAME)_libretro_ps3.a
CC = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-gcc.exe
CXX = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-g++.exe
AR = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ar.exe
BAKE_IN_ZLIB=1
SHARED := -lm -lc
CFLAGS += -D__CELLOS_LV2 -DHAVE_ASPRINTF
WANT_ZLIB=1
STATIC_LINKING=1
STATIC_LINKING_LINK=1
else ifeq ($(platform), psl1ght)
TARGET := $(TARGET_NAME)_libretro_$(platform).a
CC = $(PS3DEV)/ppu/bin/ppu-gcc$(EXE_EXT)
@ -205,7 +193,7 @@ else ifeq ($(platform), psl1ght)
AR = $(PS3DEV)/ppu/bin/ppu-ar$(EXE_EXT)
BAKE_IN_ZLIB=1
SHARED := -lm -lc
CFLAGS += -D__CELLOS_LV2 -DHAVE_ASPRINTF
CFLAGS += -DHAVE_ASPRINTF
WANT_ZLIB=1
STATIC_LINKING=1
STATIC_LINKING_LINK=1

View File

@ -9,10 +9,15 @@ extern const char *retro_content_directory;
char RETRO_DIR[512];
//TIME
#ifdef __CELLOS_LV2__
#include "sys/sys_time.h"
#include "sys/timer.h"
#ifdef __PS3__
#ifdef __PSL1GHT__
#include <sys/systime.h>
#else
#include <sys/sys_time.h>
#include <sys/timer.h>
#define usleep sys_timer_usleep
#define sysGetCurrentTime sys_time_get_current_time
#endif
#elif defined(_WIN32)
#include <windows.h>
#include <mmsystem.h>
@ -86,15 +91,12 @@ long GetTicks(void)
#else
#ifndef _ANDROID_
#ifdef __CELLOS_LV2__
//#warning "GetTick PS3\n"
#ifdef __PS3__
unsigned long ticks_micro;
uint64_t secs;
uint64_t nsecs;
sys_time_get_current_time(&secs, &nsecs);
sysGetCurrentTime(&secs, &nsecs);
ticks_micro = secs * 1000000UL + (nsecs / 1000);
return ticks_micro/1000;

View File

@ -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

View File

@ -113,16 +113,19 @@ Uint8 type;
#define SDL_GetMouseState(X,Y) GuiGetMouseState((X),(Y))
#define SDL_WarpMouse(x, y) do {gmx=x;gmy=y;} while (0)
//PS3 HACK
#if defined(__CELLOS_LV2__)
#if defined(__PS3__)
#include <unistd.h> //stat() is defined here
#ifdef __PSL1GHT__
#include <sys/systime.h>
#else
#include <sys/sys_time.h>
#include <sys/timer.h>
#define S_ISDIR(x) (x & CELL_FS_S_IFDIR)
#define F_OK 0
#include "sys/sys_time.h"
#include "sys/timer.h"
#define usleep sys_timer_usleep
#endif
#endif
#endif

View File

@ -1,5 +1,5 @@
#ifdef __LIBRETRO__
#if defined(ANDROID) || defined(__CELLOS_LV2__)
#if defined(ANDROID) || defined(__PS3__)
#undef HAVE_POSIX_MEMALIGN
#else
#define HAVE_POSIX_MEMALIGN 1