From 060544d078e63e299a36a846d3967db197de04a0 Mon Sep 17 00:00:00 2001 From: SindenLightgun <47393540+SindenLightgun@users.noreply.github.com> Date: Sat, 14 Sep 2019 23:59:29 +0100 Subject: [PATCH] Adding Guncon support for mouse based lightguns --- frontend/plugin.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/frontend/plugin.c b/frontend/plugin.c index 1fcd7bed..30b0e082 100644 --- a/frontend/plugin.c +++ b/frontend/plugin.c @@ -58,12 +58,15 @@ static long PADreadPort1(PadDataS *pad) { 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) + 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 || in_type[pad_index] == PSE_PAD_TYPE_GUNCON) { 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->rightJoyY = in_analog_right[pad_index][1]; + + pad->absoluteX = in_analog_left[pad_index][0]; + pad->absoluteY = in_analog_left[pad_index][1]; } return 0; } @@ -78,12 +81,15 @@ static long PADreadPort2(PadDataS *pad) { 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) + 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 || in_type[pad_index] == PSE_PAD_TYPE_GUNCON) { 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->rightJoyY = in_analog_right[pad_index][1]; + + pad->absoluteX = in_analog_left[pad_index][0]; + pad->absoluteY = in_analog_left[pad_index][1]; } return 0; } -- 2.39.5