[quadrapassel] quadrapassel: Add game controller support



commit 5531a067cc56b45d6d369f0a8f0af3b1069bc243
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Sat Dec 2 13:44:09 2017 +0100

    quadrapassel: Add game controller support

 src/quadrapassel.vala |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/quadrapassel.vala b/src/quadrapassel.vala
index 6c19ba4..0a81135 100644
--- a/src/quadrapassel.vala
+++ b/src/quadrapassel.vala
@@ -567,6 +567,7 @@ public class Quadrapassel : Gtk.Application
     {
         manette_device.button_press_event.connect (manette_button_press_event_cb);
         manette_device.button_release_event.connect (manette_button_release_event_cb);
+        manette_device.absolute_axis_event.connect (manette_absolute_axis_event_cb);
     }
 
     private void manette_button_press_event_cb (Manette.Event event)
@@ -642,6 +643,15 @@ public class Quadrapassel : Gtk.Application
         }
     }
 
+    private void manette_absolute_axis_event_cb (Manette.Event event)
+    {
+        // uint16 axis;
+        // double value;
+
+        // if (event.get_absolute (out axis, out value))
+        //     axes[axis] = (int16) (value * int16.MAX);
+    }
+
     private bool key_press_event_cb (Gtk.Widget widget, Gdk.EventKey event)
     {
         var keyval = upper_key (event.keyval);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]