[gnome-games/wip/exalm/ds: 11/15] retro-runner: Add init and deinit signals
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/wip/exalm/ds: 11/15] retro-runner: Add init and deinit signals
- Date: Mon, 7 Jan 2019 09:09:14 +0000 (UTC)
commit d82e997352f32f3c0a52e15203ddb1b769c2e531
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]