Merge pull request #107 from trinemark/pce

remove c++11
This commit is contained in:
hizzlekizzle 2019-04-28 22:22:58 -05:00 committed by GitHub
commit 5eab384352
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 29 additions and 31 deletions

View File

@ -69,7 +69,6 @@ ifneq (,$(findstring unix,$(platform)))
TARGET := $(TARGET_NAME)_libretro.so
fpic := -fPIC
SHARED := -shared -Wl,--no-undefined -Wl,--version-script=link.T
CXXFLAGS += -fpermissive -std=c++11
ifneq (,$(findstring Haiku,$(shell uname -s)))
LDFLAGS += -lroot
else
@ -133,7 +132,6 @@ else ifeq ($(platform), osx)
OSXVER = `sw_vers -productVersion | cut -d. -f 2`
OSX_LT_MAVERICKS = `(( $(OSXVER) <= 9)) && echo "YES"`
fpic += -mmacosx-version-min=10.1
CXXFLAGS += -fpermissive -std=c++11
# iOS
else ifneq (,$(findstring ios,$(platform)))
@ -155,7 +153,6 @@ else ifneq (,$(findstring ios,$(platform)))
FLAGS += $(IPHONEMINVER)
CC += $(IPHONEMINVER)
CXX += $(IPHONEMINVER)
CXXFLAGS += -fpermissive -std=c++11
# QNX
else ifeq ($(platform), qnx)
@ -236,7 +233,7 @@ include $(DEVKITPRO)/libnx/switch_rules
CFLAGS := $(DEFINES) -g -O2 -fPIE -I$(LIBNX)/include/ -ffunction-sections -fdata-sections -ftls-model=local-exec -Wl,--allow-multiple-definition -specs=$(LIBNX)/switch.specs
CFLAGS += $(INCDIRS)
CFLAGS += $(INCLUDE) -D__SWITCH__
CXXFLAGS := $(ASFLAGS) $(CFLAGS) -fexceptions -fno-rtti -std=gnu++11
CXXFLAGS := $(ASFLAGS) $(CFLAGS) -fexceptions -fno-rtti
CFLAGS += -std=gnu11
STATIC_LINKING = 1
@ -268,7 +265,6 @@ else ifneq (,$(filter $(platform), ngc wii wiiu))
else ifeq ($(platform), emscripten)
TARGET := $(TARGET_NAME)_libretro_$(platform).bc
STATIC_LINKING = 1
CXXFLAGS += -std=c++11
# GCW Zero
else ifeq ($(platform), gcw0)

View File

@ -34,7 +34,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE := retro
LOCAL_SRC_FILES := $(SOURCES_CXX) $(SOURCES_C)
LOCAL_CFLAGS := $(COREFLAGS)
LOCAL_CXXFLAGS := $(COREFLAGS) -std=c++11
LOCAL_CXXFLAGS := $(COREFLAGS)
LOCAL_LDFLAGS := -Wl,-version-script=$(CORE_DIR)/link.T
LOCAL_CPP_FEATURES := exceptions
include $(BUILD_SHARED_LIBRARY)

View File

@ -1025,7 +1025,7 @@ void VDC::FetchSpriteData(void)
void VDC::DrawSprites(uint16 *target, int enabled)
{
alignas(16) uint16 sprite_line_buf[1024];
MDFN_ALIGN(16) uint16 sprite_line_buf[1024];
uint32 display_width, start, end;

View File

@ -16,8 +16,8 @@ typedef uint32_t uint32;
typedef uint64_t uint64;
#ifdef __GNUC__
#define MDFN_UNLIKELY(n) __builtin_expect((n) != 0, 0)
#define MDFN_LIKELY(n) __builtin_expect((n) != 0, 1)
#define MDFN_UNLIKELY(n) __builtin_expect((n) != 0, 0)
#define MDFN_LIKELY(n) __builtin_expect((n) != 0, 1)
#define NO_INLINE __attribute__((noinline))
@ -31,14 +31,15 @@ typedef uint64_t uint64;
#define MDFN_FORMATSTR(a,b,c) __attribute__ ((format (a, b, c)));
#define MDFN_WARN_UNUSED_RESULT __attribute__ ((warn_unused_result))
#define MDFN_NOWARN_UNUSED __attribute__((unused))
#define MDFN_ASSUME_ALIGNED(p, align) (p)
#elif defined(_MSC_VER)
#if _MSC_VER < 1800
#define roundf(in) (in >= 0.0f ? floorf(in + 0.5f) : ceilf(in - 0.5f))
#endif
#define NO_INLINE
#define MDFN_LIKELY(n) ((n) != 0)
#define MDFN_UNLIKELY(n) ((n) != 0)
#if _MSC_VER < 1800
#define roundf(in) (in >= 0.0f ? floorf(in + 0.5f) : ceilf(in - 0.5f))
#endif
#define NO_INLINE
#define MDFN_LIKELY(n) ((n) != 0)
#define MDFN_UNLIKELY(n) ((n) != 0)
#define MDFN_FASTCALL
@ -48,6 +49,7 @@ typedef uint64_t uint64;
#define MDFN_WARN_UNUSED_RESULT
#define MDFN_NOWARN_UNUSED
#define MDFN_ASSUME_ALIGNED(p, align) (p)
#else
#error "Not compiling with GCC nor MSVC"

View File

@ -1,7 +1,7 @@
#ifndef __MDFN_PCE_HUC6280_H
#define __MDFN_PCE_HUC6280_H
class alignas(128) HuC6280
class MDFN_ALIGN(128) HuC6280
{
public:

View File

@ -23,12 +23,12 @@ class PCE_Input_Gamepad : public PCE_Input_Device
{
public:
PCE_Input_Gamepad();
virtual void TransformInput(uint8* data, const bool DisableSR) override;
virtual void Power(int32 timestamp) override;
virtual void Write(int32 timestamp, bool old_SEL, bool new_SEL, bool old_CLR, bool new_CLR) override;
virtual uint8 Read(int32 timestamp) override;
virtual void Update(const uint8 *data, bool start_frame) override;
virtual int StateAction(StateMem *sm, int load, int data_only, const char *section_name) override;
virtual void TransformInput(uint8* data, const bool DisableSR);
virtual void Power(int32 timestamp);
virtual void Write(int32 timestamp, bool old_SEL, bool new_SEL, bool old_CLR, bool new_CLR);
virtual uint8 Read(int32 timestamp);
virtual void Update(const uint8 *data, bool start_frame);
virtual int StateAction(StateMem *sm, int load, int data_only, const char *section_name);
private:
bool SEL, CLR;

View File

@ -86,12 +86,12 @@ public:
nonvolatile = nv;
}
virtual ~MCGenjin_CS_Device_RAM() override
virtual ~MCGenjin_CS_Device_RAM()
{
}
virtual void Power(void) override
virtual void Power(void)
{
if(!nonvolatile)
ram.assign(ram.size(), 0xFF);
@ -99,7 +99,7 @@ public:
bank_select = 0;
}
virtual int StateAction(StateMem *sm, int load, int data_only, const char *sname) override
virtual int StateAction(StateMem *sm, int load, int data_only, const char *sname)
{
SFORMAT StateRegs[] =
{
@ -115,12 +115,12 @@ public:
}
virtual uint8 Read(int32 timestamp, uint32 A) override
virtual uint8 Read(int32 timestamp, uint32 A)
{
return ram[(A | (bank_select << 18)) & (ram.size() - 1)];
}
virtual void Write(int32 timestamp, uint32 A, uint8 V) override
virtual void Write(int32 timestamp, uint32 A, uint8 V)
{
if(!A)
bank_select = V;
@ -128,17 +128,17 @@ public:
ram[(A | (bank_select << 18)) & (ram.size() - 1)] = V;
}
virtual uint32 GetNVSize(void) const override
virtual uint32 GetNVSize(void) const
{
return nonvolatile ? ram.size() : 0;
}
virtual const uint8* ReadNV(void) const override
virtual const uint8* ReadNV(void) const
{
return &ram[0];
}
virtual void WriteNV(const uint8 *buffer, uint32 offset, uint32 count) override
virtual void WriteNV(const uint8 *buffer, uint32 offset, uint32 count)
{
while(count)
{

View File

@ -39,7 +39,7 @@ typedef struct
extern vce_resolution_t vce_resolution;
class VCE final
class VCE
{
public: