shithub: choc

Download patch

ref: 4f8972e688a82e59184cdbd70d5fc7d7292e9619
parent: 4bddc00244c2e1561d2d24a322156c7887e7e2ed
author: Simon Howard <fraggle@gmail.com>
date: Sun Aug 24 16:23:22 EDT 2014

setup: Add gamepad config for Buffalo Classic Gamepad.

The Buffalo Classic USB Gamepad is a USB gamepad that resembles the
classic SNES controller. Thansk to Fabian Greffrath for sending in
the report.

--- a/src/setup/joystick.c
+++ b/src/setup/joystick.c
@@ -260,6 +260,22 @@
     {NULL, 0},
 };
 
+// Buffalo Classic USB Gamepad (thanks Fabian Greffrath).
+static const joystick_config_t buffalo_classic_controller[] =
+{
+    {"joystick_x_axis",        0},
+    {"joystick_y_axis",        1},
+    {"joyb_use",               0},    // A
+    {"joyb_speed",             1},    // B
+    {"joyb_jump",              2},    // X
+    {"joyb_fire",              3},    // Y
+    {"joyb_strafeleft",        4},    // Left shoulder
+    {"joyb_straferight",       5},    // Right shoulder
+    {"joyb_prevweapon",        6},    // Select
+    {"joyb_menu_activate",     7},    // Start
+    {NULL, 0},
+};
+
 static const known_joystick_t known_joysticks[] =
 {
     {
@@ -309,6 +325,12 @@
         "USB Vibration Joystick",
         4, 12, 1,
         multilaser_js030_controller,
+    },
+
+    {
+        "USB,2-axis 8-button gamepad  ",
+        2, 8, 0,
+        buffalo_classic_controller,
     },
 };