foxygit / doom Log in
commit b92fa936769f1bbe37caebb78271c545cc063c4c
Author:     Jonathan Dowland <jmtd@debian.org>
AuthorDate: Sun Apr 2 19:58:45 2017 +0100
Commit:     Jonathan Dowland <jmtd@debian.org>
CommitDate: Sun Apr 2 19:58:45 2017 +0100

    Re-order NES30 Pro and FC30 Pro entries

    Re-order so NES30 Pro entries come first and FC30 Pro entries second,
    but they are ordered the same (so e.g. the 4,16,1 mapping for NES30
    Pro comes first amongst the NES30 Pro patterns and the 4,16,1 mappig
    also comes first amongst the FC30 Pro mappings)

    There are only two differences between the two sets:

     * The 4,15,1 mapping for NES30 Pro is untested but theorized to exist
     * The Joystick-suffix mode for NES30 Pro could not be reproduced on
       the FC30 (doesn't appear to SDL as a joystick at all)
---
 src/setup/joystick.c | 58 ++++++++++++++++++++++++++++++----------------------
 1 file changed, 34 insertions(+), 24 deletions(-)

diff --git a/src/setup/joystick.c b/src/setup/joystick.c
index 533fc678..ad0ff5a2 100644
--- a/src/setup/joystick.c
+++ b/src/setup/joystick.c
@@ -460,55 +460,65 @@ static const known_joystick_t known_joysticks[] =
         nes30_pro_controller,
     },

-    // 8Bitdo FC30 Pro, http://8bitdo.cn/fc30pro/
-    // variant of the above, connected over USB
+    // the above, NES variant, via USB on Linux/Raspbian (odd values)
     {
-        "8Bitdo FC30 Pro",
-        4, 15, 1,
+        "8Bitdo NES30 Pro*",
+        6, 15, 1,
         nes30_pro_controller,
     },

-    // the above, via USB on Linux/Raspbian (odd values)
+    // the above, NES variant, connected over bluetooth
     {
-        "8Bitdo FC30 Pro*",
-        6, 15, 1,
+        "8Bitdo NES30 Pro",
+        6, 16, 1,
         nes30_pro_controller,
     },

-    // the above, NES variant, via USB on Linux/Raspbian (odd values)
+    // 8bitdo NES30 Pro, in joystick mode (R1+Power), swaps the D-Pad
+    // and analog stick inputs.  Only applicable over Bluetooth. On USB,
+    // this mode registers the device as an Xbox 360 pad.
     {
-        "8Bitdo NES30 Pro*",
-        6, 15, 1,
+        "8Bitdo NES30 Pro Joystick",
+        6, 16, 1,
         nes30_pro_controller,
     },

-    // the above, connected over bluetooth
+    // variant of the above, via USB on Mac
+    // Note: untested, but theorized to exist based on us comparing
+    // a NES30 Pro tested on Linux with a FC30 Pro tested with Mac & Linux
     {
-        "8Bitdo FC30 Pro",
-        4, 16, 1,
+        "8Bitdo NES30 Pro",
+        4, 15, 1,
         nes30_pro_controller,
     },

-    // yet another variant, Linux/bluetooth
+
+    // 8Bitdo FC30 Pro, http://8bitdo.cn/fc30pro/
+    // connected over bluetooth
     {
         "8Bitdo FC30 Pro",
-	6, 16, 1,
-	nes30_pro_controller,
+        4, 16, 1,
+        nes30_pro_controller,
     },

-    // the above, NES variant, connected over bluetooth
+    // variant of the above, via USB on Linux/Raspbian
     {
-        "8Bitdo NES30 Pro",
-        6, 16, 1,
+        "8Bitdo FC30 Pro*",
+        6, 15, 1,
         nes30_pro_controller,
     },

-    // 8bitdo NES30 Pro, in joystick mode (R1+Power), swaps the D-Pad
-    // and analog stick inputs.  Only applicable over Bluetooth. On USB,
-    // this mode registers the device as an Xbox 360 pad.
+    // variant of the above, Linux/bluetooth
     {
-        "8Bitdo NES30 Pro Joystick",
-        6, 16, 1,
+        "8Bitdo FC30 Pro",
+	6, 16, 1,
+	nes30_pro_controller,
+    },
+
+    // variant of the above, via USB on Mac
+    {
+        "8Bitdo FC30 Pro",
+        4, 15, 1,
         nes30_pro_controller,
     },