diff --git a/Makefile b/Makefile index 8903033b..7bc0f0e7 100644 --- a/Makefile +++ b/Makefile @@ -448,7 +448,6 @@ else ifneq (,$(findstring windows_msvc2017,$(platform))) export LIB := $(LIB);$(WindowsSDKUCRTLibDir);$(WindowsSDKUMLibDir) TARGET := $(TARGET_NAME)_libretro.dll TARGET_TMP := $(TARGET_NAME)_libretro.lib $(TARGET_NAME)_libretro.pdb $(TARGET_NAME)_libretro.exp - PSS_STYLE :=2 LDFLAGS += -DLL # Windows @@ -542,12 +541,9 @@ FLAGS += $(fpic) $(NEW_GCC_FLAGS) FLAGS += $(INCFLAGS) FLAGS += $(ENDIANNESS_DEFINES) \ - -DSIZEOF_DOUBLE=8 \ $(WARNINGS) \ -DMEDNAFEN_VERSION=\"0.9.38.6\" \ - -DPACKAGE=\"mednafen\" \ -DMEDNAFEN_VERSION_NUMERIC=9386 \ - -DPSS_STYLE=1 \ -DMPC_FIXED_POINT \ $(CORE_DEFINE) \ -DSTDC_HEADERS \ diff --git a/jni/Android.mk b/jni/Android.mk index 8a81cbb2..67d37874 100644 --- a/jni/Android.mk +++ b/jni/Android.mk @@ -63,7 +63,7 @@ ifeq ($(HAVE_HW),1) -I$(CORE_DIR)/parallel-psx/volk endif -COREFLAGS := -funroll-loops $(INCFLAGS) -DMEDNAFEN_VERSION=\"0.9.26\" -DMEDNAFEN_VERSION_NUMERIC=926 -DPSS_STYLE=1 -D__LIBRETRO__ -D_LOW_ACCURACY_ -DINLINE="inline" $(FLAGS) +COREFLAGS := -funroll-loops $(INCFLAGS) -DMEDNAFEN_VERSION=\"0.9.26\" -DMEDNAFEN_VERSION_NUMERIC=926 -D__LIBRETRO__ -D_LOW_ACCURACY_ -DINLINE="inline" $(FLAGS) COREFLAGS += -DWANT_PSX_EMU $(GLFLAGS) GIT_VERSION := " $(shell git rev-parse --short HEAD || echo unknown)" diff --git a/mednafen/Stream.h b/mednafen/Stream.h index 820c4884..596ba718 100644 --- a/mednafen/Stream.h +++ b/mednafen/Stream.h @@ -6,9 +6,6 @@ // TODO?: BufferedStream, no virtual functions, yes inline functions, constructor takes a Stream* argument. #include "mednafen.h" -#include - -#include // For SEEK_* defines, which we will use in Stream out of FORCE OF HABIT. #define MODE_READ 0 #define MODE_WRITE 1 diff --git a/mednafen/cdrom/CDAccess_Image.cpp b/mednafen/cdrom/CDAccess_Image.cpp index b0b5a7aa..0f329fb2 100644 --- a/mednafen/cdrom/CDAccess_Image.cpp +++ b/mednafen/cdrom/CDAccess_Image.cpp @@ -39,7 +39,6 @@ #include #include -#include #include #include "../general.h" diff --git a/mednafen/cdrom/CDAccess_PBP.cpp b/mednafen/cdrom/CDAccess_PBP.cpp index e7aa2099..7e537add 100644 --- a/mednafen/cdrom/CDAccess_PBP.cpp +++ b/mednafen/cdrom/CDAccess_PBP.cpp @@ -23,7 +23,6 @@ #include #include -#include #include #include "../general.h" diff --git a/mednafen/cdrom/audioreader.cpp b/mednafen/cdrom/audioreader.cpp index db69162f..531aaa65 100644 --- a/mednafen/cdrom/audioreader.cpp +++ b/mednafen/cdrom/audioreader.cpp @@ -27,7 +27,6 @@ #include "../tremor/ivorbisfile.h" #include -#include #include #include "../general.h" @@ -46,7 +45,7 @@ AudioReader::~AudioReader() int64_t AudioReader::Read_(int16_t *buffer, int64_t frames) { abort(); - return(false); + return 0; } bool AudioReader::Seek_(int64_t frame_offset) @@ -58,7 +57,7 @@ bool AudioReader::Seek_(int64_t frame_offset) int64_t AudioReader::FrameCount(void) { abort(); - return(0); + return 0; } class OggVorbisReader : public AudioReader @@ -81,7 +80,7 @@ static size_t iov_read_func(void *ptr, size_t size, size_t nmemb, void *user_dat Stream *fw = (Stream*)user_data; if(!size || !fw) - return(0); + return 0; return fw->read(ptr, size * nmemb) / size; } @@ -92,7 +91,7 @@ static int iov_seek_func(void *user_data, int64_t offset, int whence) if (fw) fw->seek(offset, whence); - return(0); + return 0; } static int iov_close_func(void *user_data) @@ -101,7 +100,7 @@ static int iov_close_func(void *user_data) if (fw) fw->close(); - return(0); + return 0; } static long iov_tell_func(void *user_data) diff --git a/mednafen/mednafen-types.h b/mednafen/mednafen-types.h index 99eb5ced..35608bfd 100644 --- a/mednafen/mednafen-types.h +++ b/mednafen/mednafen-types.h @@ -42,7 +42,6 @@ #include #include #include -#include #include #ifdef __cplusplus diff --git a/mednafen/mempatcher.cpp b/mednafen/mempatcher.cpp index ebc3aedf..ea0b8a5c 100644 --- a/mednafen/mempatcher.cpp +++ b/mednafen/mempatcher.cpp @@ -15,9 +15,9 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include #include #include -#include #include #ifdef _WIN32 @@ -61,13 +61,9 @@ typedef struct __CHEATF #endif static std::vector cheats; -static int savecheats; -static uint32 resultsbytelen = 1; -static bool resultsbigendian = 0; static bool CheatsActive = true; -bool SubCheatsOn = 0; -std::vector SubCheats[8]; +static std::vector SubCheats[8]; MemoryPatch::MemoryPatch() : addr(0), val(0), compare(0), mltpl_count(1), mltpl_addr_inc(0), mltpl_val_inc(0), copy_src_addr(0), copy_src_addr_inc(0), @@ -85,7 +81,6 @@ static void RebuildSubCheats(void) { std::vector::iterator chit; - SubCheatsOn = 0; for(int x = 0; x < 8; x++) SubCheats[x].clear(); @@ -112,7 +107,6 @@ static void RebuildSubCheats(void) else tmpsub.compare = -1; SubCheats[(chit->addr + x) & 0x7].push_back(tmpsub); - SubCheatsOn = 1; } } } @@ -217,8 +211,6 @@ void MDFNI_AddCheat(const MemoryPatch& patch) { cheats.push_back(patch); - savecheats = true; - MDFNMP_RemoveReadPatches(); RebuildSubCheats(); MDFNMP_InstallReadPatches(); @@ -228,8 +220,6 @@ int MDFNI_DelCheat(uint32 which) { cheats.erase(cheats.begin() + which); - savecheats=1; - MDFNMP_RemoveReadPatches(); RebuildSubCheats(); MDFNMP_InstallReadPatches(); @@ -611,8 +601,6 @@ void MDFNI_SetCheat(uint32 which, const MemoryPatch& patch) { cheats[which] = patch; - savecheats = true; - MDFNMP_RemoveReadPatches(); RebuildSubCheats(); MDFNMP_InstallReadPatches(); @@ -622,7 +610,6 @@ void MDFNI_SetCheat(uint32 which, const MemoryPatch& patch) int MDFNI_ToggleCheat(uint32 which) { cheats[which].status = !cheats[which].status; - savecheats = 1; RebuildSubCheats(); return(cheats[which].status); diff --git a/mednafen/mempatcher.h b/mednafen/mempatcher.h index 7c5a7c0b..0cc8ad94 100644 --- a/mednafen/mempatcher.h +++ b/mednafen/mempatcher.h @@ -11,14 +11,10 @@ typedef struct __SUBCHEAT int compare; // < 0 on no compare } SUBCHEAT; -extern std::vector SubCheats[8]; -extern bool SubCheatsOn; - bool MDFNMP_Init(uint32 ps, uint32 numpages); void MDFNMP_AddRAM(uint32 size, uint32 address, uint8 *RAM); void MDFNMP_Kill(void); - void MDFNMP_InstallReadPatches(void); void MDFNMP_RemoveReadPatches(void); diff --git a/mednafen/settings.c b/mednafen/settings.c index c5502eda..85d2f811 100644 --- a/mednafen/settings.c +++ b/mednafen/settings.c @@ -17,7 +17,6 @@ #include #include -#include #include