From ea4775801b424594e309a3413815b67cc53d6ac1 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 21 Feb 2018 13:49:45 +0100 Subject: Update for MSVC --- source/cpuexec.h | 4 ---- source/memmap.c | 6 +++--- source/port.h | 6 +++--- 3 files changed, 6 insertions(+), 10 deletions(-) (limited to 'source') diff --git a/source/cpuexec.h b/source/cpuexec.h index 3a5075b..4898207 100644 --- a/source/cpuexec.h +++ b/source/cpuexec.h @@ -5,11 +5,7 @@ typedef struct { -#ifdef __WIN32__ - void (__cdecl* S9xOpcode)(void); -#else void (*S9xOpcode)(void); -#endif } SOpcodes; #include "ppu.h" diff --git a/source/memmap.c b/source/memmap.c index 209b6cd..d5c29b1 100644 --- a/source/memmap.c +++ b/source/memmap.c @@ -471,7 +471,7 @@ static uint32_t FileLoader(uint8_t* buffer, const char* filename, int32_t maxsiz _splitpath(filename, drive, dir, name, ext); _makepath(fname, drive, dir, name, ext); -#ifdef __WIN32__ +#ifdef _WIN32 /* memmove required: Overlapping addresses [Neb] */ memmove(&ext [0], &ext[1], 4); #endif @@ -524,7 +524,7 @@ static uint32_t FileLoader(uint8_t* buffer, const char* filename, int32_t maxsiz { more = true; ext [0]++; -#ifdef __WIN32__ +#ifdef _WIN32 /* memmove required: Overlapping addresses [Neb] */ memmove(&ext [1], &ext [0], 4); ext [0] = '.'; @@ -535,7 +535,7 @@ static uint32_t FileLoader(uint8_t* buffer, const char* filename, int32_t maxsiz { more = true; name [len - 1]++; -#ifdef __WIN32__ +#ifdef _WIN32 /* memmove required: Overlapping addresses [Neb] */ memmove(&ext [1], &ext [0], 4); ext [0] = '.'; diff --git a/source/port.h b/source/port.h index c2a9b7f..fcfe836 100644 --- a/source/port.h +++ b/source/port.h @@ -18,7 +18,7 @@ #include "pixform.h" -#ifndef __WIN32__ +#ifndef _WIN32 #ifndef PATH_MAX #define PATH_MAX 1024 @@ -46,7 +46,7 @@ void _makepath(char* path, const char* drive, const char* dir, const char* fname, const char* ext); void _splitpath(const char* path, char* drive, char* dir, char* fname, char* ext); -#else /* __WIN32__ */ +#else /* _WIN32 */ #define strcasecmp stricmp #define strncasecmp strnicmp #endif @@ -54,7 +54,7 @@ void _splitpath(const char* path, char* drive, char* dir, char* fname, char* ext #define SLASH_STR "/" #define SLASH_CHAR '/' -#if defined(__i386__) || defined(__i486__) || defined(__i586__) || defined(__WIN32__) || defined(__alpha__) +#if defined(__i386__) || defined(__i486__) || defined(__i586__) || defined(_XBOX1) || defined(__alpha__) #define FAST_LSB_WORD_ACCESS #elif defined(__MIPSEL__) /* On little-endian MIPS, a 16-bit word can be read directly from an address -- cgit v1.2.3