[gnome-games/wip/exalm/runner-refactor: 23/33] retro-runner: Merge store_save_ram_in_tmp() into save_to_snapshot()
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/wip/exalm/runner-refactor: 23/33] retro-runner: Merge store_save_ram_in_tmp() into save_to_snapshot()
- Date: Fri, 6 Mar 2020 14:18:52 +0000 (UTC)
commit 06c726f29dc87fe2e6fcf4261c694b4325c099fa
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Fri Mar 6 17:03:28 2020 +0500
retro-runner: Merge store_save_ram_in_tmp() into save_to_snapshot()
src/retro/retro-runner.vala | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)
---
diff --git a/src/retro/retro-runner.vala b/src/retro/retro-runner.vala
index 7a8f2eae..1b350418 100644
--- a/src/retro/retro-runner.vala
+++ b/src/retro/retro-runner.vala
@@ -534,14 +534,6 @@ public class Games.RetroRunner : Object, Runner {
return @"$(Config.OPTIONS_DIR)/$options_name.options";
}
- private void store_save_ram_in_tmp () throws Error {
- if (core.get_memory_size (Retro.MemoryType.SAVE_RAM) == 0)
- return;
-
- core.save_memory (Retro.MemoryType.SAVE_RAM,
- tmp_live_savestate.get_save_ram_path ());
- }
-
private void load_save_ram (string save_ram_path) throws Error {
if (!FileUtils.test (save_ram_path, FileTest.EXISTS))
return;
@@ -633,8 +625,9 @@ public class Games.RetroRunner : Object, Runner {
}
protected virtual void save_to_snapshot (Savestate savestate) throws Error {
- // Populate the savestate in tmp with data from the current state of the game
- store_save_ram_in_tmp ();
+ if (core.get_memory_size (Retro.MemoryType.SAVE_RAM) > 0)
+ core.save_memory (Retro.MemoryType.SAVE_RAM,
+ savestate.get_save_ram_path ());
if (media_set.get_size () > 1)
savestate.set_media_data (media_set);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]