[gnome-games] retro-runner: Don't call get_can_access_state() before the game is running
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] retro-runner: Don't call get_can_access_state() before the game is running
- Date: Sat, 20 Mar 2021 16:55:40 +0000 (UTC)
commit 8690411d045a9745e38e92a705b3eec7ed31865c
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Fri Mar 19 21:53:13 2021 +0500
retro-runner: Don't call get_can_access_state() before the game is running
src/retro/retro-runner.vala | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/retro/retro-runner.vala b/src/retro/retro-runner.vala
index 6d8db470..cc909972 100644
--- a/src/retro/retro-runner.vala
+++ b/src/retro/retro-runner.vala
@@ -17,7 +17,7 @@ public class Games.RetroRunner : Object, Runner {
}
public bool supports_snapshots {
- get { return core.get_can_access_state (); }
+ get { return started && core.get_can_access_state (); }
}
public bool is_integrated {
@@ -64,6 +64,7 @@ public class Games.RetroRunner : Object, Runner {
}
}
+ private bool started;
private bool core_loaded;
private bool is_error;
@@ -273,6 +274,7 @@ public class Games.RetroRunner : Object, Runner {
// Unpause an already running game
core.run ();
running = true;
+ started = true;
}
public void pause () {
@@ -347,6 +349,7 @@ public class Games.RetroRunner : Object, Runner {
}
_running = false;
+ started = false;
core_loaded = false;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]