Adding Guncon support for mouse based lightguns
authorSindenLightgun <47393540+SindenLightgun@users.noreply.github.com>
Sat, 14 Sep 2019 22:59:29 +0000 (23:59 +0100)
committerGitHub <noreply@github.com>
Sat, 14 Sep 2019 22:59:29 +0000 (23:59 +0100)
frontend/plugin.c

index 1fcd7be..30b0e08 100644 (file)
@@ -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;
 }