[gnome-games/wip/exalm/subprocess: 6/6] a



commit 6d6d8758e24a85dbbb2a9050e26a3dce3f7b82b8
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Mon Jan 13 17:04:44 2020 +0500

    a

 flatpak/org.gnome.Games.json |  5 ++---
 meson.build                  |  2 +-
 src/retro/retro-gamepad.vala | 14 +++++++++-----
 3 files changed, 12 insertions(+), 9 deletions(-)
---
diff --git a/flatpak/org.gnome.Games.json b/flatpak/org.gnome.Games.json
index 0be9bff3..4f2c9d7c 100644
--- a/flatpak/org.gnome.Games.json
+++ b/flatpak/org.gnome.Games.json
@@ -217,9 +217,8 @@
             "buildsystem" : "meson",
             "sources" : [
                 {
-                    "type" : "git",
-                    "url" : "https://gitlab.gnome.org/exalm/retro-gtk.git";,
-                    "branch" : "wip/exalm/subprocess3"
+                    "type" : "dir",
+                    "path" : "/home/exalm/Projects/retro-gtk"
                 }
             ]
         },
diff --git a/meson.build b/meson.build
index 18d3cecd..091e8510 100644
--- a/meson.build
+++ b/meson.build
@@ -41,7 +41,7 @@ gtk_dep = dependency ('gtk+-3.0')
 handy_dep = dependency ('libhandy-0.0', version: '>=' + handy_min_version)
 m_dep = cc.find_library('m', required : false)
 manette_dep = dependency ('manette-0.2', version: '>=' + manette_min_version)
-retro_gtk_dep = dependency ('retro-gtk-0.14', version: '>=' + retro_gtk_min_version)
+retro_gtk_dep = dependency ('retro-gtk-1', version: '>=' + retro_gtk_min_version)
 rsvg_dep = dependency ('librsvg-2.0')
 soup_dep = dependency ('libsoup-2.4')
 sqlite_dep = dependency ('sqlite3')
diff --git a/src/retro/retro-gamepad.vala b/src/retro/retro-gamepad.vala
index 127b6897..d8117bde 100644
--- a/src/retro/retro-gamepad.vala
+++ b/src/retro/retro-gamepad.vala
@@ -21,8 +21,6 @@ private class Games.RetroGamepad : Object, Retro.Controller {
                device.absolute_axis_event.connect (on_absolute_axis_event);
        }
 
-       public void poll () {}
-
        public int16 get_input_state (Retro.Input input) {
                switch (input.get_controller_type ()) {
                case Retro.ControllerType.JOYPAD:
@@ -100,22 +98,28 @@ private class Games.RetroGamepad : Object, Retro.Controller {
        private void on_button_press_event (Manette.Event event) {
                uint16 button;
 
-               if (event.get_button (out button))
+               if (event.get_button (out button)) {
                        buttons[button] = true;
+                       emit_state_changed ();
+               }
        }
 
        private void on_button_release_event (Manette.Event event) {
                uint16 button;
 
-               if (event.get_button (out button))
+               if (event.get_button (out button)) {
                        buttons[button] = false;
+                       emit_state_changed ();
+               }
        }
 
        private void on_absolute_axis_event (Manette.Event event) {
                uint16 axis;
                double value;
 
-               if (event.get_absolute (out axis, out value))
+               if (event.get_absolute (out axis, out value)) {
                        axes[axis] = (int16) (value * int16.MAX);
+                       emit_state_changed ();
+               }
        }
 }


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