diff --git a/Makefile.libretro b/Makefile.libretro index 2ce33ff..86e333c 100644 --- a/Makefile.libretro +++ b/Makefile.libretro @@ -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 diff --git a/libretro/core/core-mapper.c b/libretro/core/core-mapper.c index 95b710f..bdc1f8a 100644 --- a/libretro/core/core-mapper.c +++ b/libretro/core/core-mapper.c @@ -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 +#else +#include +#include #define usleep sys_timer_usleep +#define sysGetCurrentTime sys_time_get_current_time +#endif #elif defined(_WIN32) #include #include @@ -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; diff --git a/libretro/core/libretro.h b/libretro/core/libretro.h index 7add848..f97a969 100644 --- a/libretro/core/libretro.h +++ b/libretro/core/libretro.h @@ -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 diff --git a/libretro/include/SDL.h b/libretro/include/SDL.h index ac3945c..cee34cd 100644 --- a/libretro/include/SDL.h +++ b/libretro/include/SDL.h @@ -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 //stat() is defined here +#ifdef __PSL1GHT__ +#include +#else +#include +#include #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 diff --git a/libretro/include/config.h b/libretro/include/config.h index 6041520..62111ea 100644 --- a/libretro/include/config.h +++ b/libretro/include/config.h @@ -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