From f40e999393f4316943760459ace0e7994c2c76b9 Mon Sep 17 00:00:00 2001 From: Andrew Date: Thu, 22 Dec 2016 17:28:39 -0800 Subject: Do some light multitap cleanup After seeing the regressions from multitap I took a quick look at the code, and there's quite a bit of cleanup needed. This fixes the initial really obvious stuff, a useless copy and a duplicate in_keystate that can cause compilation issues, along with bringing styling closer to the pcsx standard so it's a bit more readable. The multitap changeset also seems to have been done with an editor that mangled line endings, I'll address that in a followup commit. --- frontend/plugin.c | 2 +- frontend/plugin_lib.c | 3 ++- frontend/plugin_lib.h | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'frontend') diff --git a/frontend/plugin.c b/frontend/plugin.c index 8914519..6bb9aa4 100644 --- a/frontend/plugin.c +++ b/frontend/plugin.c @@ -73,7 +73,7 @@ static long PADreadPort2(PadDataS *pad) { pad->controllerType = in_type[pad_index]; pad->buttonStatus = ~in_keystate[pad_index]; - if (multitap2 ==1 ) + if (multitap2 == 1) pad->portMultitap = 2; else pad->portMultitap = 0; diff --git a/frontend/plugin_lib.c b/frontend/plugin_lib.c index ad2f49b..c65bfeb 100644 --- a/frontend/plugin_lib.c +++ b/frontend/plugin_lib.c @@ -43,7 +43,8 @@ int in_analog_left[8][2] = {{ 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_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; +unsigned short in_keystate[8]; +int in_state_gun; int in_enable_vibration; void *tsdev; void *pl_vout_buf; diff --git a/frontend/plugin_lib.h b/frontend/plugin_lib.h index ad27fc2..83b2774 100644 --- a/frontend/plugin_lib.h +++ b/frontend/plugin_lib.h @@ -23,7 +23,7 @@ extern int multitap1; extern int multitap2; extern int in_analog_left[8][2]; extern int in_analog_right[8][2]; -unsigned short in_keystate[8]; +extern unsigned short in_keystate[8]; extern int in_adev[2], in_adev_axis[2][2]; extern int in_adev_is_nublike[2]; -- cgit v1.2.3