[gnome-games] retro-runner: Always clone the latest savestate when loading
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] retro-runner: Always clone the latest savestate when loading
- Date: Fri, 20 Sep 2019 16:52:29 +0000 (UTC)
commit 54ecca34a0eee2a316c2048665ac21745f8bc56e
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Fri Sep 20 21:45:25 2019 +0500
retro-runner: Always clone the latest savestate when loading
Ensure that savedir is in place before loading the game.
src/retro/retro-runner.vala | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/retro/retro-runner.vala b/src/retro/retro-runner.vala
index 4364791a..2015ca9f 100644
--- a/src/retro/retro-runner.vala
+++ b/src/retro/retro-runner.vala
@@ -147,13 +147,15 @@ public class Games.RetroRunner : Object, Runner {
// Step 3) Instantiate the core
// This is needed to check if the core supports savestates
- tmp_live_savestate = Savestate.create_empty_in_tmp (platform);
+ if (latest_savestate != null)
+ tmp_live_savestate = latest_savestate.clone_in_tmp ();
+ else
+ tmp_live_savestate = Savestate.create_empty_in_tmp (platform);
instantiate_core (tmp_live_savestate.get_save_directory_path ());
// Step 4) Preview the latest savestate --------------------------------
if (latest_savestate != null)
preview_savestate (latest_savestate);
-
}
public Gtk.Widget get_display () {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]