aboutsummaryrefslogtreecommitdiff
path: root/frontend/plugin_lib.c
diff options
context:
space:
mode:
authoralexis-puska2016-05-09 10:33:05 +0100
committercbransden2016-05-13 17:55:51 +0100
commit61c4962abc49e430aabea5e565d93436a57cfa0a (patch)
tree4f1a651cfc4b07502f9ddabc44857cd9a59ab45c /frontend/plugin_lib.c
parent93fed87bed7cc0bdc0f74e3f852282d938f7db4f (diff)
downloadpcsx_rearmed-61c4962abc49e430aabea5e565d93436a57cfa0a.tar.gz
pcsx_rearmed-61c4962abc49e430aabea5e565d93436a57cfa0a.tar.bz2
pcsx_rearmed-61c4962abc49e430aabea5e565d93436a57cfa0a.zip
Initial multitap support
Diffstat (limited to 'frontend/plugin_lib.c')
-rw-r--r--frontend/plugin_lib.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/frontend/plugin_lib.c b/frontend/plugin_lib.c
index 237a5eb..89803ce 100644
--- a/frontend/plugin_lib.c
+++ b/frontend/plugin_lib.c
@@ -36,9 +36,10 @@
#define HUD_HEIGHT 10
-int in_type1, in_type2;
-int in_a1[2] = { 127, 127 }, in_a2[2] = { 127, 127 };
-int in_a3[2] = { 127, 127 }, in_a4[2] = { 127, 127 };
+int in_type[8];
+int in_analog_left[8][2] = {{ 127, 127 },{ 127, 127 },{ 127, 127 },{ 127, 127 },{ 127, 127 },{ 127, 127 },{ 127, 127 },{ 127, 127 }};
+int in_analog_right[8][2] = {{ 127, 127 },{ 127, 127 },{ 127, 127 },{ 127, 127 },{ 127, 127 },{ 127, 127 },{ 127, 127 },{ 127, 127 }};
+//int in_a1[2] = { 127, 127 }, in_a2[2] = { 127, 127 };
int in_adev[2] = { -1, -1 }, in_adev_axis[2][2] = {{ 0, 1 }, { 0, 1 }};
int in_adev_is_nublike[2];
int in_keystate, in_state_gun;
@@ -561,7 +562,7 @@ static void update_analog_nub_adjust(int *x_, int *y_)
static void update_analogs(void)
{
- int *nubp[2] = { in_a1, in_a2 };
+ int *nubp[2] = { in_analog_left[0], in_analog_right[0] };
int vals[2];
int i, a, v, ret;
@@ -598,7 +599,7 @@ static void update_input(void)
unsigned int emu_act;
in_update(actions);
- if (in_type1 == PSE_PAD_TYPE_ANALOGPAD)
+ if (in_type[0] == PSE_PAD_TYPE_ANALOGPAD)
update_analogs();
emu_act = actions[IN_BINDTYPE_EMU];
in_state_gun = (emu_act & SACTION_GUN_MASK) >> SACTION_GUN_TRIGGER;
@@ -612,7 +613,8 @@ static void update_input(void)
}
emu_set_action(emu_act);
- in_keystate = actions[IN_BINDTYPE_PLAYER12];
+ in_keystate[0] = actions[IN_BINDTYPE_PLAYER12];
+
}
#else /* MAEMO */
extern void update_input(void);