aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authornotaz2015-01-03 02:22:14 +0200
committernotaz2015-01-03 02:25:30 +0200
commit003cfc63c69b3e900de768317354dfb80bbf6a55 (patch)
treeaf0c284d996d5969731337244b18b55facea5e08 /plugins
parent3aba41853f8dc014ff61e05e8a2c616d89f88715 (diff)
downloadpcsx_rearmed-003cfc63c69b3e900de768317354dfb80bbf6a55.tar.gz
pcsx_rearmed-003cfc63c69b3e900de768317354dfb80bbf6a55.tar.bz2
pcsx_rearmed-003cfc63c69b3e900de768317354dfb80bbf6a55.zip
mingw build fixes
Diffstat (limited to 'plugins')
-rw-r--r--plugins/cdrcimg/cdrcimg.c10
-rw-r--r--plugins/dfinput/main.c15
-rw-r--r--plugins/dfsound/spu.c13
-rw-r--r--plugins/dfsound/stdafx.h20
-rw-r--r--plugins/dfsound/xa.c4
5 files changed, 34 insertions, 28 deletions
diff --git a/plugins/cdrcimg/cdrcimg.c b/plugins/cdrcimg/cdrcimg.c
index 0ec14db..76cdfba 100644
--- a/plugins/cdrcimg/cdrcimg.c
+++ b/plugins/cdrcimg/cdrcimg.c
@@ -12,7 +12,13 @@
#include <string.h>
#include <stdlib.h>
#include <zlib.h>
+#ifndef _WIN32
+#define CALLBACK
#include <dlfcn.h>
+#else
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#endif
#include "cdrcimg.h"
@@ -44,7 +50,7 @@ static struct {
static int current_block, current_sect_in_blk;
struct CdrStat;
-extern long CDR__getStatus(struct CdrStat *stat);
+extern long CALLBACK CDR__getStatus(struct CdrStat *stat);
struct CdrStat
{
@@ -279,6 +285,7 @@ static long CDRinit(void)
return -1;
}
}
+#ifndef _WIN32
if (pBZ2_bzBuffToBuffDecompress == NULL) {
void *h = dlopen("/usr/lib/libbz2.so.1", RTLD_LAZY);
if (h == NULL)
@@ -291,6 +298,7 @@ static long CDRinit(void)
}
}
}
+#endif
return 0;
}
diff --git a/plugins/dfinput/main.c b/plugins/dfinput/main.c
index 73b2bda..475ea07 100644
--- a/plugins/dfinput/main.c
+++ b/plugins/dfinput/main.c
@@ -8,6 +8,13 @@
* See the COPYING file in the top-level directory.
*/
+#ifndef _WIN32
+#define CALLBACK
+#else
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#endif
+
#include "main.h"
unsigned char CurPad, CurByte, CurCmd, CmdLen;
@@ -15,10 +22,10 @@ unsigned char CurPad, CurByte, CurCmd, CmdLen;
/* since this is not a proper plugin, so we'll hook emu internals in a hackish way like this */
extern void *PAD1_startPoll, *PAD1_poll;
extern void *PAD2_startPoll, *PAD2_poll;
-extern unsigned char PAD1__startPoll(int pad);
-extern unsigned char PAD2__startPoll(int pad);
-extern unsigned char PAD1__poll(unsigned char value);
-extern unsigned char PAD2__poll(unsigned char value);
+extern unsigned char CALLBACK PAD1__startPoll(int pad);
+extern unsigned char CALLBACK PAD2__startPoll(int pad);
+extern unsigned char CALLBACK PAD1__poll(unsigned char value);
+extern unsigned char CALLBACK PAD2__poll(unsigned char value);
static int old_controller_type1 = -1, old_controller_type2 = -1;
diff --git a/plugins/dfsound/spu.c b/plugins/dfsound/spu.c
index 835555d..d39bbc1 100644
--- a/plugins/dfsound/spu.c
+++ b/plugins/dfsound/spu.c
@@ -18,6 +18,9 @@
* *
***************************************************************************/
+#ifndef _WIN32
+#include <sys/time.h> // gettimeofday in xa.c
+#endif
#include "stdafx.h"
#define _IN_SPU
@@ -28,16 +31,6 @@
#include "arm_features.h"
#include "spu_config.h"
-#ifdef ENABLE_NLS
-#include <libintl.h>
-#include <locale.h>
-#define _(x) gettext(x)
-#define N_(x) (x)
-#else
-#define _(x) (x)
-#define N_(x) (x)
-#endif
-
#ifdef __ARM_ARCH_7A__
#define ssat32_to_16(v) \
asm("ssat %0,#16,%1" : "=r" (v) : "r" (v))
diff --git a/plugins/dfsound/stdafx.h b/plugins/dfsound/stdafx.h
index 8993bb3..7e22029 100644
--- a/plugins/dfsound/stdafx.h
+++ b/plugins/dfsound/stdafx.h
@@ -15,26 +15,20 @@
* *
***************************************************************************/
-#ifndef _MACOSX
-#include "config.h"
-#endif
#include <stdio.h>
#include <stdlib.h>
-#include <sys/ioctl.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <pthread.h>
-#define RRand(range) (random()%range)
#include <string.h>
-#include <sys/time.h>
-#include <math.h>
+#ifdef _WIN32
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#else
#undef CALLBACK
#define CALLBACK
#define DWORD unsigned int
-#define LOWORD(l) ((unsigned short)(l))
-#define HIWORD(l) ((unsigned short)(((unsigned int)(l) >> 16) & 0xFFFF))
+#define LOWORD(l) ((unsigned short)(l))
+#define HIWORD(l) ((unsigned short)(((unsigned int)(l) >> 16) & 0xFFFF))
+#endif
#ifndef INLINE
#define INLINE static inline
diff --git a/plugins/dfsound/xa.c b/plugins/dfsound/xa.c
index 704847b..9b7ed5a 100644
--- a/plugins/dfsound/xa.c
+++ b/plugins/dfsound/xa.c
@@ -90,9 +90,13 @@ INLINE void MixXA(int ns_to)
static unsigned long timeGetTime_spu()
{
+#ifdef _WIN32
+ return GetTickCount();
+#else
struct timeval tv;
gettimeofday(&tv, 0); // well, maybe there are better ways
return tv.tv_sec * 1000 + tv.tv_usec/1000; // to do that, but at least it works
+#endif
}
////////////////////////////////////////////////////////////////////////