[gnome-games/wip/exalm/n64: 18/21] retro-runner: Add controllers-changed signal



commit b105bb27cca1dfffa2d96c8d175d6d6a31386225
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Thu Mar 26 23:49:48 2020 +0500

    retro-runner: Add controllers-changed signal
    
    Forward it from RetroInputManager.

 src/retro/retro-runner.vala | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/src/retro/retro-runner.vala b/src/retro/retro-runner.vala
index f8c5f647..f0c5c994 100644
--- a/src/retro/retro-runner.vala
+++ b/src/retro/retro-runner.vala
@@ -1,6 +1,8 @@
 // This file is part of GNOME Games. License: GPL-3.0+.
 
 public class Games.RetroRunner : Object, Runner {
+       public signal void controllers_changed ();
+
        public bool can_fullscreen {
                get { return true; }
        }
@@ -200,6 +202,10 @@ public class Games.RetroRunner : Object, Runner {
                        core.set_current_media (media_set.selected_media_number);
 
                input_manager = new RetroInputManager (core, view);
+               input_manager.controllers_changed.connect (() => {
+                       controllers_changed ();
+               });
+
                // Keep the internal values of input_mode in sync between RetroRunner and RetroInputManager
                input_mode = get_available_input_modes ()[0];
 


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