mirror of
https://github.com/libretro/beetle-psx-libretro.git
synced 2024-11-23 00:39:40 +00:00
Header include cleanups - avoid errno among other things
This commit is contained in:
parent
02303bd592
commit
66f2d6c4ce
4
Makefile
4
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 \
|
||||
|
@ -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)"
|
||||
|
@ -6,9 +6,6 @@
|
||||
// TODO?: BufferedStream, no virtual functions, yes inline functions, constructor takes a Stream* argument.
|
||||
|
||||
#include "mednafen.h"
|
||||
#include <errno.h>
|
||||
|
||||
#include <stdio.h> // For SEEK_* defines, which we will use in Stream out of FORCE OF HABIT.
|
||||
|
||||
#define MODE_READ 0
|
||||
#define MODE_WRITE 1
|
||||
|
@ -39,7 +39,6 @@
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "../general.h"
|
||||
|
@ -23,7 +23,6 @@
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "../general.h"
|
||||
|
@ -27,7 +27,6 @@
|
||||
#include "../tremor/ivorbisfile.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <time.h>
|
||||
|
||||
#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)
|
||||
|
@ -42,7 +42,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <math.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -15,9 +15,9 @@
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include <vector>
|
||||
|
||||
#ifdef _WIN32
|
||||
@ -61,13 +61,9 @@ typedef struct __CHEATF
|
||||
#endif
|
||||
|
||||
static std::vector<CHEATF> cheats;
|
||||
static int savecheats;
|
||||
static uint32 resultsbytelen = 1;
|
||||
static bool resultsbigendian = 0;
|
||||
static bool CheatsActive = true;
|
||||
|
||||
bool SubCheatsOn = 0;
|
||||
std::vector<SUBCHEAT> SubCheats[8];
|
||||
static std::vector<SUBCHEAT> 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<CHEATF>::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);
|
||||
|
@ -11,14 +11,10 @@ typedef struct __SUBCHEAT
|
||||
int compare; // < 0 on no compare
|
||||
} SUBCHEAT;
|
||||
|
||||
extern std::vector<SUBCHEAT> 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);
|
||||
|
||||
|
@ -17,7 +17,6 @@
|
||||
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <libretro.h>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user