[gnome-games] retro-runner: Save snapshots only when supported
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] retro-runner: Save snapshots only when supported
- Date: Sat, 30 Apr 2016 07:18:19 +0000 (UTC)
commit 9a9cce03dc90951392d9d05fd2c78df2ffcee813
Author: Adrien Plazas <kekun plazas laposte net>
Date: Sat Apr 30 08:57:30 2016 +0200
retro-runner: Save snapshots only when supported
Saves the snapshots only if it is supported by the core.
This avoids to change the 'should_save' flag when we can't snpshot the
game.
src/retro/retro-runner.vala | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/retro/retro-runner.vala b/src/retro/retro-runner.vala
index b04edf1..5e9d8de 100644
--- a/src/retro/retro-runner.vala
+++ b/src/retro/retro-runner.vala
@@ -2,7 +2,7 @@
public class Games.RetroRunner : Object, Runner {
public bool can_quit_safely {
- get { return core_supports_snapshotting || !should_save; }
+ get { return !should_save; }
}
public bool can_resume {
@@ -241,6 +241,10 @@ public class Games.RetroRunner : Object, Runner {
return;
save_ram ();
+
+ if (!core_supports_snapshotting)
+ return;
+
save_snapshot ();
save_screenshot ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]