X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=libpcsxcore%2Fplugins.c;h=c9ccd2ae9fa280edd3a0294fe6ae9d05dd3aea4b;hb=e288923db915ae8e0facd2fe0be8ed866b4f2373;hp=8d3a00e192d0c97600cef1f81cf6e4d1f2a7c09e;hpb=05311a18fb23799776f9552614ef4c5fb5d852fa;p=pcsx_rearmed.git diff --git a/libpcsxcore/plugins.c b/libpcsxcore/plugins.c index 8d3a00e1..c9ccd2ae 100644 --- a/libpcsxcore/plugins.c +++ b/libpcsxcore/plugins.c @@ -205,7 +205,7 @@ void CALLBACK GPU__vBlank(int val) {} #define LoadGpuSym1(dest, name) \ LoadSym(GPU_##dest, GPU##dest, name, TRUE); - + #define LoadGpuSym0(dest, name) \ LoadSym(GPU_##dest, GPU##dest, name, FALSE); \ if (GPU_##dest == NULL) GPU_##dest = (GPU##dest) GPU__##dest; @@ -371,7 +371,7 @@ void *hPAD2Driver = NULL; static int multitap1 = -1; static int multitap2 = -1; -static unsigned char buf[512]; +static unsigned char buf[256]; unsigned char stdpar[10] = { 0x00, 0x41, 0x5a, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; unsigned char mousepar[8] = { 0x00, 0x12, 0x5a, 0xff, 0xff, 0xff, 0xff }; unsigned char analogpar[9] = { 0x00, 0xff, 0x5a, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; @@ -521,22 +521,25 @@ unsigned char CALLBACK PAD1__startPoll(int pad) { // first call the pad provide if a multitap is connected between the psx and himself if(multitap1 == -1) { - PadDataS padd; - PAD1_readPort1(&padd, 0); + PadDataS padd; + padd.requestPadIndex = 0; + PAD1_readPort1(&padd); multitap1 = padd.portMultitap; } // just one pad is on port 1 : NO MULTITAP if (multitap1 == 0) { - PadDataS padd; - PAD1_readPort1(&padd, 0); + PadDataS padd; + padd.requestPadIndex = 0; + PAD1_readPort1(&padd); return _PADstartPoll(&padd); } else { // a multitap is plugged : refresh all pad. int i=0; PadDataS padd[4]; - for(i = 0; i < 4; i++) { - PAD1_readPort1(&padd[i], i); + for(i = 0; i < 4; i++) { + padd[i].requestPadIndex = i; + PAD1_readPort1(&padd[i]); } return _PADstartPollMultitap(padd); } @@ -609,22 +612,25 @@ unsigned char CALLBACK PAD2__startPoll(int pad) { } //first call the pad provide if a multitap is connected between the psx and himself if(multitap2 == -1){ - PadDataS padd; - PAD2_readPort2(&padd,pad_index); + PadDataS padd; + padd.requestPadIndex = pad_index; + PAD2_readPort2(&padd); multitap2 = padd.portMultitap; } // just one pad is on port 2 : NO MULTITAP if (multitap2 == 0){ - PadDataS padd; - PAD2_readPort2(&padd,pad_index); + PadDataS padd; + padd.requestPadIndex = pad_index; + PAD2_readPort2(&padd); return _PADstartPoll(&padd); }else{ //a multitap is plugged : refresh all pad. int i=0; PadDataS padd[4]; - for(i=0;i<4;i++){ - PAD2_readPort2(&padd[i],i+pad_index); + for(i=0;i<4;i++){ + padd[i].requestPadIndex = i+pad_index; + PAD2_readPort2(&padd[i]); } return _PADstartPollMultitap(padd); }