From: SindenLightgun <47393540+SindenLightgun@users.noreply.github.com> Date: Sat, 14 Sep 2019 22:59:29 +0000 (+0100) Subject: Adding Guncon support for mouse based lightguns X-Git-Tag: r24l~691^2~5 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=060544d078e63e299a36a846d3967db197de04a0;p=pcsx_rearmed.git Adding Guncon support for mouse based lightguns --- 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; }