foxygit / doom Log in
commit 512f236b25bbd2274cfdf17830f811ae6ab25e37
Author:     Jonathan Dowland <jon+github@alcopop.org>
AuthorDate: Thu Mar 2 08:55:23 2017 +0000
Commit:     Jonathan Dowland <jon+github@alcopop.org>
CommitDate: Thu Mar 2 08:55:23 2017 +0000

    Add NES30 to known joysticks

    In the two bluetooth modes; I don't have a micro USB cable handy to
    test USB gamepad mode right now.
---
 src/setup/joystick.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/setup/joystick.c b/src/setup/joystick.c
index 373d6951..81be774e 100644
--- a/src/setup/joystick.c
+++ b/src/setup/joystick.c
@@ -344,6 +344,7 @@ static const joystick_config_t nes30_pro_controller[] =
 };

 // http://www.8bitdo.com/sfc30/ or http://www.8bitdo.com/snes30/
+// and http://www.8bitdo.com/nes30/
 static const joystick_config_t sfc30_controller[] =
 {
     {"joystick_x_axis",        0},
@@ -496,6 +497,15 @@ static const known_joystick_t known_joysticks[] =
         4, 12, 1,
         sfc30_controller,
     },
+
+    // NES30 (not pro), tested in default and "hold R whilst turning on"
+    // mode, with whatever firmware it came with out of the box. Latter
+    // mode puts " Joystick" suffix on the name string
+    {
+        "8Bitdo NES30 GamePad*",
+        4, 16, 1,
+        sfc30_controller, // identical to SFC30
+    },
 };

 static const known_joystick_t *GetJoystickType(int index)