X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=frontend%2Fplugin.c;h=7f3b8a463b1bc327f14000f7368f5c87471db03b;hb=8c84ba5f4478dd4e7cc48e86f1b023bc6b99ea9c;hp=196c9802876edcd7ec9b9c83196f2d9385ada4ae;hpb=029e681c394691e626aab685eacad0610b6048ad;p=pcsx_rearmed.git diff --git a/frontend/plugin.c b/frontend/plugin.c index 196c9802..7f3b8a46 100644 --- a/frontend/plugin.c +++ b/frontend/plugin.c @@ -35,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); @@ -43,26 +43,26 @@ 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 CALLBACK PADreadPort1(PadDataS *pad) { - pad->controllerType = in_type1; - pad->buttonStatus = ~in_keystate; - if (in_type1 == PSE_PAD_TYPE_ANALOGPAD) { - pad->leftJoyX = in_a1[0]; - pad->leftJoyY = in_a1[1]; - pad->rightJoyX = in_a2[0]; - pad->rightJoyY = in_a2[1]; + pad->controllerType = in_type[0]; + pad->buttonStatus = ~in_keystate[0]; + if (in_type[0] == PSE_PAD_TYPE_ANALOGPAD) { + pad->leftJoyX = in_analog_left[0][0]; + pad->leftJoyY = in_analog_left[0][1]; + pad->rightJoyX = in_analog_right[0][0]; + pad->rightJoyY = in_analog_right[0][1]; } return 0; } static long CALLBACK PADreadPort2(PadDataS *pad) { - pad->controllerType = in_type2; - pad->buttonStatus = ~in_keystate >> 16; + pad->controllerType = in_type[1]; + pad->buttonStatus = ~in_keystate[0] >> 16; return 0; } @@ -266,9 +266,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; \