[gnome-games] retro-runner: Defer core.run() until resetting
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] retro-runner: Defer core.run() until resetting
- Date: Wed, 29 Jan 2020 21:17:05 +0000 (UTC)
commit a21c60d8fabf7b26f3857db085ba60445979ff36
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Thu Jan 30 02:13:00 2020 +0500
retro-runner: Defer core.run() until resetting
Doing core.run() early seems to break Picodrive memory loading, as it
reports 0 memory size after that. However, at the same time not doing it
at all breaks PX68k, as it crashes on core.reset(). Considering the
expected boot order isn't documented, try to please both by moving
core.run() to immediately before resetting, so that memory is already
restored by that time. It doesn't seem to regress anything on the first
glance and can always be reverted if it does after all.
src/retro/retro-runner.vala | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/retro/retro-runner.vala b/src/retro/retro-runner.vala
index 0325bf7e..951e389b 100644
--- a/src/retro/retro-runner.vala
+++ b/src/retro/retro-runner.vala
@@ -239,6 +239,8 @@ public class Games.RetroRunner : Object, Runner {
is_ready = true;
}
+
+ core.run (); // Needed to finish preparing some cores.
core.reset ();
loop.start ();
@@ -275,8 +277,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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]