[gnome-games/wip/exalm/subprocess] Adapt for subprocess libretro
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/wip/exalm/subprocess] Adapt for subprocess libretro
- Date: Sun, 5 Jan 2020 16:19:26 +0000 (UTC)
commit f87af2ede1de8b8b8e7d71daa4c6e2a65736a8ed
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Sun Jan 5 20:54:01 2020 +0500
Adapt for subprocess libretro
flatpak/org.gnome.Games.json | 3 ++-
plugins/nintendo-ds/src/nintendo-ds-runner.vala | 10 ----------
src/retro/retro-options.vala | 3 +--
src/retro/retro-runner.vala | 16 ++++++----------
4 files changed, 9 insertions(+), 23 deletions(-)
---
diff --git a/flatpak/org.gnome.Games.json b/flatpak/org.gnome.Games.json
index 83ebd0cf..a9a8b074 100644
--- a/flatpak/org.gnome.Games.json
+++ b/flatpak/org.gnome.Games.json
@@ -218,7 +218,8 @@
"sources" : [
{
"type" : "git",
- "url" : "https://gitlab.gnome.org/GNOME/retro-gtk.git"
+ "url" : "https://gitlab.gnome.org/exalm/retro-gtk.git",
+ "branch" : "wip/exalm/subprocess"
}
]
},
diff --git a/plugins/nintendo-ds/src/nintendo-ds-runner.vala b/plugins/nintendo-ds/src/nintendo-ds-runner.vala
index bfebab0f..a554fe3b 100644
--- a/plugins/nintendo-ds/src/nintendo-ds-runner.vala
+++ b/plugins/nintendo-ds/src/nintendo-ds-runner.vala
@@ -34,7 +34,6 @@ private class Games.NintendoDsRunner : RetroRunner {
}
construct {
- game_init.connect (on_init);
}
private bool core_supports_layouts () {
@@ -43,12 +42,6 @@ private class Games.NintendoDsRunner : RetroRunner {
return core != null && core.has_option (SCREENS_LAYOUT_OPTION);
}
- private void on_init () {
- var core = get_core ();
-
- core.options_set.connect (update_screen_layout);
- }
-
private void update_screen_layout () {
if (!core_supports_layouts ())
return;
@@ -70,9 +63,6 @@ private class Games.NintendoDsRunner : RetroRunner {
}
public override Gtk.Widget? get_extra_widget () {
- if (!core_supports_layouts ())
- return null;
-
return new NintendoDsLayoutSwitcher (this);
}
diff --git a/src/retro/retro-options.vala b/src/retro/retro-options.vala
index 22c4e869..a3e5e6fd 100644
--- a/src/retro/retro-options.vala
+++ b/src/retro/retro-options.vala
@@ -15,9 +15,8 @@ private class Games.RetroOptions : Object {
foreach (var key in options_keys) {
var val = keyfile.get_string (OPTIONS_GROUP, key);
- var option = core.get_option (key);
- option.set_value (val);
+ core.set_default_option (key, val);
}
}
}
diff --git a/src/retro/retro-runner.vala b/src/retro/retro-runner.vala
index f80a8db1..b64e23f9 100644
--- a/src/retro/retro-runner.vala
+++ b/src/retro/retro-runner.vala
@@ -273,8 +273,6 @@ public class Games.RetroRunner : Object, Runner {
core.shutdown.connect (on_shutdown);
- core.run (); // Needed to finish preparing some cores.
-
loop = new Retro.MainLoop (core);
running = false;
@@ -322,14 +320,12 @@ public class Games.RetroRunner : Object, Runner {
var options_path = get_options_path ();
if (FileUtils.test (options_path, FileTest.EXISTS))
- core.options_set.connect (() => {
- try {
- var options = new RetroOptions (options_path);
- options.apply (core);
- } catch (Error e) {
- critical (e.message);
- }
- });
+ try {
+ var options = new RetroOptions (options_path);
+ options.apply (core);
+ } catch (Error e) {
+ critical (e.message);
+ }
game_init ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]