notaz.gp2x.de
/
pcsx_rearmed.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix OSX interpreter build target
[pcsx_rearmed.git]
/
frontend
/
plugin.c
diff --git
a/frontend/plugin.c
b/frontend/plugin.c
index
53ecac9
..
1fcd7be
100644
(file)
--- a/
frontend/plugin.c
+++ b/
frontend/plugin.c
@@
-49,15
+49,17
@@
extern void CALLBACK SPUasync(unsigned int, unsigned int);
extern int CALLBACK SPUplayCDDAchannel(short *, int);
/* PAD */
extern int CALLBACK SPUplayCDDAchannel(short *, int);
/* PAD */
-static long PADreadPort1(PadDataS *pad, int pad_index) {
+static long PADreadPort1(PadDataS *pad) {
+ int pad_index = pad->requestPadIndex;
pad->controllerType = in_type[pad_index];
pad->buttonStatus = ~in_keystate[pad_index];
pad->controllerType = in_type[pad_index];
pad->buttonStatus = ~in_keystate[pad_index];
- if(multitap1==1){
- pad->portMultitap=1;
- }else{
- pad->portMultitap=0;
- }
- if (in_type[pad_index] == PSE_PAD_TYPE_ANALOGPAD || in_type[pad_index] == PSE_PAD_TYPE_NEGCON) {
+ if (multitap1 == 1)
+ pad->portMultitap = 1;
+ else
+ pad->portMultitap = 0;
+
+ if (in_type[pad_index] == PSE_PAD_TYPE_ANALOGJOY || in_type[pad_index] == PSE_PAD_TYPE_ANALOGPAD || in_type[pad_index] == PSE_PAD_TYPE_NEGCON)
+ {
pad->leftJoyX = in_analog_left[pad_index][0];
pad->leftJoyY = in_analog_left[pad_index][1];
pad->rightJoyX = in_analog_right[pad_index][0];
pad->leftJoyX = in_analog_left[pad_index][0];
pad->leftJoyY = in_analog_left[pad_index][1];
pad->rightJoyX = in_analog_right[pad_index][0];
@@
-66,20
+68,18
@@
static long PADreadPort1(PadDataS *pad, int pad_index) {
return 0;
}
return 0;
}
-static long PADreadPort2(PadDataS *pad, int pad_index) {
- /* Temporary hack to avoid segfault when pad_index is a crazy number */
- if (pad_index <= 1 || pad_index > 8) {
- pad_index = 1;
- }
-
+static long PADreadPort2(PadDataS *pad) {
+ int pad_index = pad->requestPadIndex;
+
pad->controllerType = in_type[pad_index];
pad->buttonStatus = ~in_keystate[pad_index];
pad->controllerType = in_type[pad_index];
pad->buttonStatus = ~in_keystate[pad_index];
- if(multitap2==1){
- pad->portMultitap=2;
- }else{
- pad->portMultitap=0;
- }
- if (in_type[pad_index] == PSE_PAD_TYPE_ANALOGPAD || in_type[pad_index] == PSE_PAD_TYPE_NEGCON) {
+ if (multitap2 == 1)
+ pad->portMultitap = 2;
+ else
+ pad->portMultitap = 0;
+
+ if (in_type[pad_index] == PSE_PAD_TYPE_ANALOGJOY || in_type[pad_index] == PSE_PAD_TYPE_ANALOGPAD || in_type[pad_index] == PSE_PAD_TYPE_NEGCON)
+ {
pad->leftJoyX = in_analog_left[pad_index][0];
pad->leftJoyY = in_analog_left[pad_index][1];
pad->rightJoyX = in_analog_right[pad_index][0];
pad->leftJoyX = in_analog_left[pad_index][0];
pad->leftJoyY = in_analog_left[pad_index][1];
pad->rightJoyX = in_analog_right[pad_index][0];