[gnome-games/wip/exalm/ds: 6/11] retro-runner: Add init and deinit signals



commit c7695d192d67fa19e9ffb054fa9c4cbc79c9060a
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date:   Sun Jan 6 20:39:02 2019 +0500

    retro-runner: Add init and deinit signals
    
    Provide a way for plugins to perform actions when the game starts or ends.

 src/retro/retro-runner.vala | 7 +++++++
 1 file changed, 7 insertions(+)
---
diff --git a/src/retro/retro-runner.vala b/src/retro/retro-runner.vala
index a8bcc3b1..8b1e2a8d 100644
--- a/src/retro/retro-runner.vala
+++ b/src/retro/retro-runner.vala
@@ -1,6 +1,9 @@
 // This file is part of GNOME Games. License: GPL-3.0+.
 
 public class Games.RetroRunner : Object, Runner {
+       public signal void game_init ();
+       public signal void game_deinit ();
+
        public bool can_fullscreen {
                get { return true; }
        }
@@ -202,6 +205,8 @@ public class Games.RetroRunner : Object, Runner {
 
                settings.changed["video-filter"].disconnect (on_video_filter_changed);
 
+               game_deinit ();
+
                core = null;
                view.set_core (null);
                view = null;
@@ -244,6 +249,8 @@ public class Games.RetroRunner : Object, Runner {
                                }
                        });
 
+               game_init ();
+
                var platforms_dir = Application.get_platforms_dir ();
                var platform_id = platform.get_id ();
                core.system_directory = @"$platforms_dir/$platform_id/system";


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