X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=frontend%2Fplugin.c;h=a2739858dd069ed6ace632ca42771dab06579696;hb=b01fca9493973874ff33f279b0e88da2fc59da4b;hp=a617c24e9495cd32347902658b7bfcc0991b436e;hpb=3918505613cb814f8f5e0e8e0471f7b2a2cd8464;p=pcsx_rearmed.git diff --git a/frontend/plugin.c b/frontend/plugin.c index a617c24e..a2739858 100644 --- a/frontend/plugin.c +++ b/frontend/plugin.c @@ -15,14 +15,11 @@ #include "../libpcsxcore/system.h" #include "../plugins/cdrcimg/cdrcimg.h" -#ifndef _WIN32 +// this can't be __stdcall like it was in PSEmu API as too many functions are mixed up +#undef CALLBACK #define CALLBACK -#else -#define WIN32_LEAN_AND_MEAN -#include -#endif -static int dummy_func() { +static long CALLBACK dummy_func() { return 0; } @@ -38,7 +35,7 @@ extern void CALLBACK SPUwriteDMA(unsigned short); extern unsigned short CALLBACK SPUreadDMA(void); extern void CALLBACK SPUwriteDMAMem(unsigned short *, int, unsigned int); extern void CALLBACK SPUreadDMAMem(unsigned short *, int, unsigned int); -extern void CALLBACK SPUplayADPCMchannel(void *); +extern void CALLBACK SPUplayADPCMchannel(void *, unsigned int, int); extern void CALLBACK SPUregisterCallback(void (*cb)(void)); extern void CALLBACK SPUregisterScheduleCb(void (*cb)(unsigned int)); extern long CALLBACK SPUconfigure(void); @@ -46,10 +43,10 @@ extern long CALLBACK SPUtest(void); extern void CALLBACK SPUabout(void); extern long CALLBACK SPUfreeze(unsigned int, void *, unsigned int); extern void CALLBACK SPUasync(unsigned int, unsigned int); -extern int CALLBACK SPUplayCDDAchannel(short *, int); +extern int CALLBACK SPUplayCDDAchannel(short *, int, unsigned int, int); /* PAD */ -static long PADreadPort1(PadDataS *pad) { +static long CALLBACK PADreadPort1(PadDataS *pad) { int pad_index = pad->requestPadIndex; pad->controllerType = in_type[pad_index]; @@ -80,7 +77,7 @@ static long PADreadPort1(PadDataS *pad) { return 0; } -static long PADreadPort2(PadDataS *pad) { +static long CALLBACK PADreadPort2(PadDataS *pad) { int pad_index = pad->requestPadIndex; pad->controllerType = in_type[pad_index]; @@ -311,9 +308,9 @@ pc_hook_func (SPU_writeDMA, (unsigned short a0), (a0), PCNT_SPU) pc_hook_func_ret(unsigned short,SPU_readDMA, (void), (), PCNT_SPU) pc_hook_func (SPU_writeDMAMem, (unsigned short *a0, int a1, uint32_t a2), (a0, a1, a2), PCNT_SPU) pc_hook_func (SPU_readDMAMem, (unsigned short *a0, int a1, uint32_t a2), (a0, a1, a2), PCNT_SPU) -pc_hook_func (SPU_playADPCMchannel, (void *a0), (a0), PCNT_SPU) +pc_hook_func (SPU_playADPCMchannel, (void *a0, unsigned int a1, int a2), (a0, a1, a2), PCNT_SPU) pc_hook_func (SPU_async, (uint32_t a0, uint32_t a1), (a0, a1), PCNT_SPU) -pc_hook_func_ret(int, SPU_playCDDAchannel, (short *a0, int a1), (a0, a1), PCNT_SPU) +pc_hook_func_ret(int, SPU_playCDDAchannel, (short *a0, int a1, unsigned int a2, int a3), (a0, a1, a2, a3), PCNT_SPU) #define hook_it(name) { \ o_##name = name; \