Unverified Commit 5408e038 authored by Libretro-Admin's avatar Libretro-Admin Committed by GitHub
Browse files

Merge pull request #4 from Zarh/master

Fix PS3 build
parents ed49bd38 0b2ddf57
......@@ -163,6 +163,8 @@ local.properties
*.vspscc
.builds
*.dotCover
*.o
*.a
## TODO: If you have NuGet Package Restore enabled, uncomment this
#packages/
......
......@@ -123,7 +123,7 @@ else ifeq ($(platform), qnx)
else ifneq (,$(filter $(platform), ps3 sncps3 psl1ght))
TARGET := $(TARGET_NAME)_libretro_ps3.a
STATIC_LINKING = 1
ENDIANNESS_DEFINES := -DMSB_FIRST -DBYTE_ORDER=BIG_ENDIAN
ENDIANNESS_DEFINES := -DMSB_FIRST -DBYTE_ORDER=BIG_ENDIAN -D__CELLOS_LV2__
# sncps3
ifneq (,$(findstring sncps3,$(platform)))
......@@ -142,6 +142,7 @@ else ifneq (,$(filter $(platform), ps3 sncps3 psl1ght))
AR = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ar.exe
FLAGS += -DARCH_POWERPC_ALTIVEC
OLD_GCC := 1
INCFLAGS_PLATFORM := -I./deps/ps3
# Lightweight PS3 Homebrew SDK
else ifneq (,$(findstring psl1ght,$(platform)))
......
......@@ -65,7 +65,7 @@ namespace boost {
template< typename T1, typename T2 >
bool operator()( const T1& Arg1, const T2& Arg2 ) const
{
#if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL)
#if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL) || defined(__CELLOS_LV2__)
return std::toupper(Arg1)==std::toupper(Arg2);
#else
return std::toupper<T1>(Arg1,m_Loc)==std::toupper<T2>(Arg2,m_Loc);
......@@ -118,7 +118,7 @@ namespace boost {
template< typename T1, typename T2 >
bool operator()( const T1& Arg1, const T2& Arg2 ) const
{
#if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL)
#if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL) || defined(__CELLOS_LV2__)
return std::toupper(Arg1)<std::toupper(Arg2);
#else
return std::toupper<T1>(Arg1,m_Loc)<std::toupper<T2>(Arg2,m_Loc);
......@@ -171,7 +171,7 @@ namespace boost {
template< typename T1, typename T2 >
bool operator()( const T1& Arg1, const T2& Arg2 ) const
{
#if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL)
#if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL) || defined(__CELLOS_LV2__)
return std::toupper(Arg1)<=std::toupper(Arg2);
#else
return std::toupper<T1>(Arg1,m_Loc)<=std::toupper<T2>(Arg2,m_Loc);
......
#include <clocale>
......@@ -19,6 +19,10 @@ X More cars seem to be high pitched than on MAME. (Fixed - engine channel setup)
#include <cstring> // For memset on GCC
#include "engine/audio/osound.hpp"
#ifdef __CELLOS_LV2__
#define memcpy std::memcpy
#endif
// Use YM2151 Timing
#define TIMER_CODE 1
......
......@@ -45,6 +45,10 @@
#include "engine/ostats.hpp"
#include "engine/otraffic.hpp"
#ifdef __CELLOS_LV2__
#define srand std::srand
#endif
OAttractAI oattractai;
OAttractAI::OAttractAI(void)
......
......@@ -11,6 +11,10 @@
#include "engine/outils.hpp"
#include "engine/ostats.hpp"
#ifdef __CELLOS_LV2__
#define rand std::rand
#endif
outils::outils(void)
{
......
......@@ -22,6 +22,11 @@
#include "engine/ohiscore.hpp"
#include "engine/audio/osoundint.hpp"
#ifdef __CELLOS_LV2__
#define remove std::remove
#endif
// api change in boost 1.56
#include <boost/version.hpp>
#if (BOOST_VERSION >= 105600)
......
......@@ -16,6 +16,15 @@
#include "hwaudio/ym2151.hpp"
#ifdef __CELLOS_LV2__
#define memset std::memset
#define pow std::pow
#define floor std::floor
#define sin std::sin
#define log std::log
#endif
signed int chanout[8];
signed int m2,c1,c2; /* Phase Modulation input for operators 2,3,4 */
signed int mem; /* one sample delay memory */
......
......@@ -18,6 +18,10 @@
#include "engine/audio/osoundint.hpp"
#include <libretro.h>
#ifdef __CELLOS_LV2__
#define free std::free
#endif
extern retro_audio_sample_batch_t audio_batch_cb;
#ifdef COMPILE_SOUND_CODE
......
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