[gnome-games] gamepad: Add StandardGamepadAxis
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] gamepad: Add StandardGamepadAxis
- Date: Mon, 18 Jul 2016 18:53:15 +0000 (UTC)
commit fad9c1e74514ac50d630b40a6b9034225f11de1b
Author: Megh Parikh <meghprkh gmail com>
Date: Mon Jul 18 21:54:34 2016 +0530
gamepad: Add StandardGamepadAxis
This is an enum representing the axes of a standard gamepad.
This is part of a series of commits to add gamepad support.
src/Makefile.am | 1 +
src/gamepad/standard-gamepad-axis.vala | 33 ++++++++++++++++++++++++++++++++
2 files changed, 34 insertions(+), 0 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index 3393eb3..0c3f331 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -60,6 +60,7 @@ gnome_games_SOURCES = \
gamepad/linux/linux-raw-gamepad-monitor.vala \
gamepad/raw-gamepad.vala \
gamepad/raw-gamepad-monitor.vala \
+ gamepad/standard-gamepad-axis.vala \
\
grilo/grilo-cover.vala \
grilo/grilo-media.vala \
diff --git a/src/gamepad/standard-gamepad-axis.vala b/src/gamepad/standard-gamepad-axis.vala
new file mode 100644
index 0000000..630d544
--- /dev/null
+++ b/src/gamepad/standard-gamepad-axis.vala
@@ -0,0 +1,33 @@
+// This file is part of GNOME Games. License: GPLv3
+
+private enum Games.StandardGamepadAxis {
+ UNKNOWN,
+
+ /**
+ * The horizontal axis of the left stick.
+ *
+ * Negative is left, positive is right.
+ */
+ LEFT_X,
+
+ /**
+ * The vertical axis of the left stick.
+ *
+ * Negative is up, positive is down.
+ */
+ LEFT_Y,
+
+ /**
+ * The horizontal axis of the right stick.
+ *
+ * Negative is left, positive is right.
+ */
+ RIGHT_X,
+
+ /**
+ * The vertical axis of the right stick.
+ *
+ * Negative is up, positive is down.
+ */
+ RIGHT_Y,
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]