aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libgamepad.h62
1 files changed, 58 insertions, 4 deletions
diff --git a/libgamepad.h b/libgamepad.h
index 404e526..3e884cc 100644
--- a/libgamepad.h
+++ b/libgamepad.h
@@ -583,9 +583,9 @@ enum libgamepad_game_controller {
* Released 2006-11-11 for PlayStation 3
*
* Note:
- * - Newer Linux drivers no longer report pressure on the D-pad
- * (reason: "there is no good way for reporting them")
- * - Newer Linux drivers no longer report pressure L1, L2, Triangle, Square, Cross, or Circle
+ * - Newer Linux drivers no longer report pressure on the D-pad, L1, and R1
+ * (reason: "there is no good way for reporting them", a standard is however defined)
+ * - Newer Linux drivers no longer report pressure Triangle, Square, Cross, or Circle
* (reason: "there is no good way for reporting them")
* - Newer Linux drivers no longer report gyroscope readings
* (reason: "very difficult to manage from within the driver even to get
@@ -1059,7 +1059,61 @@ enum libgamepad_game_controller {
* Digital "START" (colour: blue, shape: corda-cut circle)
* button north of right thumb position
*/
- LIBGAMEPAD_CONTROLLER_GAME_GEAR
+ LIBGAMEPAD_CONTROLLER_GAME_GEAR,
+
+ /**
+ * Linux reference gamepad layout
+ *
+ * Version documented since Linux 4.12 in Documentation/input/gamepad
+ *
+ * There are multiple substandard, this one includes all features
+ *
+ * Layout:
+ * Analogue BTN_DPAD_{LEFT,RIGHT,UP,DOWN}/ABS_HAT0X/ABS_HAT0Y D-pad at upper left thumb position
+ * Clickable analogue BTN_THUMBL/ABS_X/ABS_Y stick at lower left thumb position
+ * Clickable analogue BTN_THUMBR/ABS_RX/ABS_RY stick at lower right thumb position
+ * 4 digital buttons at upper right thumb position:
+ * - North = BTN_NORTH (= BTN_X)
+ * - West = BTN_WEST (= BTN_Y)
+ * - South = BTN_SOUTH (= BTN_A)
+ * - East = BTN_EAST (= BTN_B)
+ * Analogue button BTN_TL/ABS_HAT1Y at upper left index finger position
+ * Analogue button BTN_TR/ABS_HAT1X at upper right index finger position
+ * Analogue button BTN_TL2/ABS_HAT1Y at lower left index finger position
+ * Analogue button BTN_TR2/ABS_HAT1X at lower right index finger position
+ * 3 digital button north of the centre
+ * - West = BTN_SELECT
+ * - East = BTN_START
+ * - South = BTN_MODE
+ */
+ LIBGAMEPAD_CONTROLLER_LINUX_4_12,
+
+ /**
+ * 6-button extension of `LIBGAMEPAD_CONTROLLER_LINUX_4_12`
+ *
+ * There are multiple substandard, this one includes all features
+ *
+ * Layout:
+ * Analogue BTN_DPAD_{LEFT,RIGHT,UP,DOWN}/ABS_HAT0X/ABS_HAT0Y D-pad at upper left thumb position
+ * Clickable analogue BTN_THUMBL/ABS_X/ABS_Y stick at lower left thumb position
+ * Clickable analogue BTN_THUMBR/ABS_RX/ABS_RY stick at lower right thumb position
+ * 4 digital buttons at upper right thumb position:
+ * - NE of N = BTN_X (= BTN_NORTH)
+ * - North = BTN_Y (= BTN_WEST)
+ * - West = BTN_Z
+ * - South = BTN_A (= BTN_SOUTH)
+ * - East = BTN_B (= BTN_EAST)
+ * - NE of E = BTN_C
+ * Analogue button BTN_TL/ABS_HAT1Y at upper left index finger position
+ * Analogue button BTN_TR/ABS_HAT1X at upper right index finger position
+ * Analogue button BTN_TL2/ABS_HAT1Y at lower left index finger position
+ * Analogue button BTN_TR2/ABS_HAT1X at lower right index finger position
+ * 3 digital button north of the centre
+ * - West = BTN_SELECT
+ * - East = BTN_START
+ * - South = BTN_MODE
+ */
+ LIBGAMEPAD_CONTROLLER_LINUX_4_12_6BTN_EXT
};