mirror of
https://github.com/libretro/mgba.git
synced 2024-11-23 07:59:46 +00:00
remove obsolete __CELLOS_LV2__ references - use PSL1GHT
This commit is contained in:
parent
54a1f8ebc0
commit
0db3bb0fdd
@ -248,23 +248,13 @@ else ifeq ($(platform), qnx)
|
||||
DEFINES += -Wc,-std=c99
|
||||
|
||||
# PS3
|
||||
else ifneq (,$(filter $(platform), ps3 sncps3 psl1ght))
|
||||
else ifneq (,$(filter $(platform), psl1ght))
|
||||
TARGET := $(TARGET_NAME)_libretro_ps3.a
|
||||
PLATFORM_DEFINES := -D__CELLOS_LV2__ -D__PPC__ -D__BIG_ENDIAN__
|
||||
PLATFORM_DEFINES := -D__PPC__ -D__BIG_ENDIAN__
|
||||
STATIC_LINKING = 1
|
||||
DEFINES += -std=gnu99 -fms-extensions
|
||||
HAVE_VFS_FD = 0
|
||||
|
||||
# sncps3
|
||||
ifneq (,$(findstring sncps3,$(platform)))
|
||||
CC = $(CELL_SDK)/host-win32/sn/bin/ps3ppusnc.exe
|
||||
AR = $(CELL_SDK)/host-win32/sn/bin/ps3snarl.exe
|
||||
|
||||
# PS3
|
||||
else ifneq (,$(findstring ps3,$(platform)))
|
||||
CC = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-gcc.exe
|
||||
AR = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ar.exe
|
||||
|
||||
# Lightweight PS3 Homebrew SDK
|
||||
else ifneq (,$(findstring psl1ght,$(platform)))
|
||||
TARGET := $(TARGET_NAME)_libretro_$(platform).a
|
||||
|
@ -59,14 +59,9 @@ typedef intptr_t ssize_t;
|
||||
#include <sys/time.h>
|
||||
typedef intptr_t ssize_t;
|
||||
#else
|
||||
#if !defined(__CELLOS_LV2__) && !defined(PS2)
|
||||
#if !defined(PS2)
|
||||
#include <strings.h>
|
||||
#endif
|
||||
#ifdef __CELLOS_LV2__
|
||||
//to avoid implicit declaration of function 'gettimeofday'
|
||||
#include <sys/time.h>
|
||||
int gettimeofday(struct timeval* tv, void* unused);
|
||||
#endif
|
||||
#include <unistd.h>
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
|
@ -1,96 +0,0 @@
|
||||
##############
|
||||
# Works on hosts Windows or Linux using Wine
|
||||
# Install CellSDK
|
||||
|
||||
#########################
|
||||
# Check the host platform
|
||||
|
||||
HOST_PLATFORM = linux
|
||||
ifeq ($(shell uname -a),)
|
||||
HOST_PLATFORM = windows
|
||||
else ifneq ($(findstring MINGW,$(shell uname -a)),)
|
||||
HOST_PLATFORM = windows
|
||||
else ifneq ($(findstring Darwin,$(shell uname -a)),)
|
||||
HOST_PLATFORM = darwin
|
||||
else ifneq ($(findstring win,$(shell uname -a)),)
|
||||
HOST_PLATFORM = windows
|
||||
endif
|
||||
|
||||
#########################
|
||||
# Set the target platform
|
||||
|
||||
TARGET_PLATFORM = ps3_ppc
|
||||
|
||||
#################
|
||||
# Toolchain setup
|
||||
|
||||
CC = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-gcc
|
||||
CXX = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-g++
|
||||
AS = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-as
|
||||
AR = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ar
|
||||
|
||||
############
|
||||
# Extensions
|
||||
|
||||
OBJEXT = .ps3_ppc.o
|
||||
SOEXT = .ps3_ppc.so
|
||||
LIBEXT = .ps3_ppc.a
|
||||
|
||||
################
|
||||
# Platform setup
|
||||
|
||||
STATIC_LINKING = 1
|
||||
platform = ps3
|
||||
PLATDEFS = -D__CELLOS_LV2__
|
||||
PLATCFLAGS = -DMSB_FIRST -DWORDS_BIGENDIAN=1
|
||||
PLATCXXFLAGS = -DMSB_FIRST -DWORDS_BIGENDIAN=1
|
||||
PLATLDFLAGS = -shared -lm
|
||||
PLATLDXFLAGS = -shared -lm
|
||||
|
||||
################
|
||||
# libretro setup
|
||||
|
||||
RETRODEFS = -D__LIBRETRO__
|
||||
RETROCFLAGS =
|
||||
RETROCXXFLAGS =
|
||||
RETROLDFLAGS =
|
||||
RETROLDXFLAGS =
|
||||
|
||||
#################
|
||||
# Final variables
|
||||
|
||||
DEFINES = $(PLATDEFS) $(RETRODEFS)
|
||||
CFLAGS = $(PLATCFLAGS) $(RETROCFLAGS) $(DEFINES) $(INCLUDES)
|
||||
CXXFLAGS = $(PLATCXXFLAGS) $(RETROCXXFLAGS) $(DEFINES) $(INCLUDES)
|
||||
LDFLAGS = $(PLATLDFLAGS) $(RETROLDFLAGS)
|
||||
LDXFLAGS = $(PLATLDXFLAGS) $(RETROLDXFLAGS)
|
||||
|
||||
########
|
||||
# Tuning
|
||||
|
||||
ifneq ($(DEBUG),)
|
||||
CFLAGS += -O0 -g
|
||||
CXXFLAGS += -O0 -g
|
||||
else
|
||||
CFLAGS += -O3 -DNDEBUG
|
||||
CXXFLAGS += -O3 -DNDEBUG
|
||||
endif
|
||||
|
||||
ifneq ($(LOG_PERFORMANCE),)
|
||||
CFLAGS += -DLOG_PERFORMANCE
|
||||
CXXFLAGS += -DLOG_PERFORMANCE
|
||||
endif
|
||||
|
||||
####################################
|
||||
# Variable setup for Makefile.common
|
||||
|
||||
CORE_DIR ?= ..
|
||||
BUILD_DIR ?= .
|
||||
INCLUDES =
|
||||
|
||||
include $(BUILD_DIR)/Makefile.common
|
||||
|
||||
###############
|
||||
# Include rules
|
||||
|
||||
include $(BUILD_DIR)/Makefile.rules
|
@ -10,11 +10,6 @@
|
||||
|
||||
#define MAX_CATEGORY 64
|
||||
|
||||
//log is defined in ppu math.h
|
||||
#ifdef __CELLOS_LV2__
|
||||
#undef log
|
||||
#endif
|
||||
|
||||
static struct mLogger* _defaultLogger = NULL;
|
||||
|
||||
struct mLogger* mLogGetContext(void) {
|
||||
|
@ -997,7 +997,6 @@ static void _deinitPostProcessing(void) {
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef __CELLOS_LV2__
|
||||
static void _initSensors(void) {
|
||||
if(sensorsInitDone) {
|
||||
return;
|
||||
@ -1020,7 +1019,6 @@ static void _initSensors(void) {
|
||||
|
||||
sensorsInitDone = true;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void _reloadSettings(void) {
|
||||
struct mCoreOptions opts = {
|
||||
@ -1333,9 +1331,7 @@ void retro_run(void) {
|
||||
uint16_t keys;
|
||||
bool skipFrame = false;
|
||||
|
||||
#ifndef __CELLOS_LV2__
|
||||
_initSensors();
|
||||
#endif
|
||||
inputPollCallback();
|
||||
|
||||
bool updated = false;
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#elif defined(GEKKO) || defined(__CELLOS_LV2__) || defined(_3DS) || defined(__SWITCH__) || defined(PSP) || defined(PS2)
|
||||
#elif defined(GEKKO) || defined(__PSL1GHT__) || defined(_3DS) || defined(__SWITCH__) || defined(PSP) || defined(PS2)
|
||||
/* stub */
|
||||
#elif defined(VITA)
|
||||
#include <psp2/kernel/sysmem.h>
|
||||
@ -33,7 +33,7 @@ static bool listInit = false;
|
||||
void* anonymousMemoryMap(size_t size) {
|
||||
#ifdef _WIN32
|
||||
return VirtualAlloc(NULL, size, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);
|
||||
#elif defined(__CELLOS_LV2__) || defined(GEKKO) || defined(_3DS) || defined(__SWITCH__) || defined(PSP) || defined(PS2)
|
||||
#elif defined(__PSL1GHT__) || defined(GEKKO) || defined(_3DS) || defined(__SWITCH__) || defined(PSP) || defined(PS2)
|
||||
return (void*)malloc(size);
|
||||
#elif defined(VITA)
|
||||
if (!listInit)
|
||||
@ -61,7 +61,7 @@ void mappedMemoryFree(void* memory, size_t size) {
|
||||
#ifdef _WIN32
|
||||
// size is not useful here because we're freeing the memory, not decommitting it
|
||||
VirtualFree(memory, 0, MEM_RELEASE);
|
||||
#elif defined(__CELLOS_LV2__) || defined(GEKKO) || defined(_3DS) || defined(__SWITCH__) || defined(PSP) || defined(PS2)
|
||||
#elif defined(__PSL1GHT__) || defined(GEKKO) || defined(_3DS) || defined(__SWITCH__) || defined(PSP) || defined(PS2)
|
||||
free(memory);
|
||||
#elif defined(VITA)
|
||||
UNUSED(size);
|
||||
|
@ -78,24 +78,9 @@ struct tm* localtime_r(const time_t* t, struct tm* date) {
|
||||
return date;
|
||||
#elif defined(PSP2)
|
||||
return sceKernelLibcLocaltime_r(t, date);
|
||||
#elif defined(__CELLOS_LV2__)
|
||||
*date = *localtime(t);
|
||||
return date;
|
||||
#else
|
||||
#warning localtime_r not emulated on this platform
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __CELLOS_LV2__
|
||||
#include <sys/sys_time.h>
|
||||
int gettimeofday(struct timeval* tv, void* unused) {
|
||||
int64_t time = sys_time_get_system_time();
|
||||
|
||||
tv->tv_sec = time / 1000000;
|
||||
tv->tv_usec = time - (tv->tv_sec * 1000000); // implicit rounding will take care of this for us
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user