[gnome-games/wip/abhinavsingh/gamepad-config: 25/25] gamepad: Add standard-gamepad-inputs
- From: Abhinav Singh <abhinavsingh src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/wip/abhinavsingh/gamepad-config: 25/25] gamepad: Add standard-gamepad-inputs
- Date: Mon, 10 Jul 2017 15:45:06 +0000 (UTC)
commit 03f078218d5904c0fec5feb42eb927d144193af1
Author: theawless <theawless gmail com>
Date: Fri Jun 30 23:18:44 2017 +0530
gamepad: Add standard-gamepad-inputs
This will be used for gamepad mappings.
https://bugzilla.gnome.org/show_bug.cgi?id=780754
src/Makefile.am | 1 +
src/gamepad/standard-gamepad-inputs.vala | 28 ++++++++++++++++++++++++++++
2 files changed, 29 insertions(+), 0 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index c3e6e89..98f6923 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -90,6 +90,7 @@ gnome_games_SOURCES = \
gamepad/gamepad-monitor.c \
gamepad/raw-gamepad.c \
gamepad/raw-gamepad-monitor.c \
+ gamepad/standard-gamepad-inputs.vala \
\
generic/generic-game.vala \
generic/generic-game-uri-adapter.vala \
diff --git a/src/gamepad/standard-gamepad-inputs.vala b/src/gamepad/standard-gamepad-inputs.vala
new file mode 100644
index 0000000..3b26b1d
--- /dev/null
+++ b/src/gamepad/standard-gamepad-inputs.vala
@@ -0,0 +1,28 @@
+// This file is part of GNOME Games. License: GPL-3.0+.
+
+namespace Games {
+ private const GamepadInput[] STANDARD_GAMEPAD_INPUTS = {
+ {EventCode.EV_KEY, EventCode.BTN_A },
+ {EventCode.EV_KEY, EventCode.BTN_B },
+ {EventCode.EV_KEY, EventCode.BTN_X },
+ {EventCode.EV_KEY, EventCode.BTN_Y },
+ {EventCode.EV_KEY, EventCode.BTN_THUMBL },
+ {EventCode.EV_KEY, EventCode.BTN_THUMBR },
+ {EventCode.EV_KEY, EventCode.BTN_TL },
+ {EventCode.EV_KEY, EventCode.BTN_TR },
+ {EventCode.EV_KEY, EventCode.BTN_TL2 },
+ {EventCode.EV_KEY, EventCode.BTN_TR2 },
+ {EventCode.EV_KEY, EventCode.BTN_DPAD_UP },
+ {EventCode.EV_KEY, EventCode.BTN_DPAD_LEFT },
+ {EventCode.EV_KEY, EventCode.BTN_DPAD_DOWN },
+ {EventCode.EV_KEY, EventCode.BTN_DPAD_RIGHT },
+ {EventCode.EV_KEY, EventCode.BTN_SELECT },
+ {EventCode.EV_KEY, EventCode.BTN_MODE },
+ {EventCode.EV_KEY, EventCode.BTN_START },
+
+ {EventCode.EV_ABS, EventCode.ABS_X },
+ {EventCode.EV_ABS, EventCode.ABS_RX },
+ {EventCode.EV_ABS, EventCode.ABS_Y },
+ {EventCode.EV_ABS, EventCode.ABS_RY },
+ };
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]