[gnome-games] runner: Add supports_savestates property
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] runner: Add supports_savestates property
- Date: Fri, 9 Aug 2019 13:39:13 +0000 (UTC)
commit ad62af7702d43476581c5f4e9c40e7ed14da9510
Author: Yetizone <andreii lisita gmail com>
Date: Thu Aug 8 11:22:43 2019 +0300
runner: Add supports_savestates property
src/command/command-runner.vala | 4 ++++
src/core/runner.vala | 1 +
src/dummy/dummy-runner.vala | 4 ++++
src/retro/retro-runner.vala | 4 ++++
4 files changed, 13 insertions(+)
---
diff --git a/src/command/command-runner.vala b/src/command/command-runner.vala
index c20664ce..469a25de 100644
--- a/src/command/command-runner.vala
+++ b/src/command/command-runner.vala
@@ -13,6 +13,10 @@ public class Games.CommandRunner : Object, Runner {
get { return false; }
}
+ public bool supports_savestates {
+ get { return false; }
+ }
+
public MediaSet? media_set {
get { return null; }
}
diff --git a/src/core/runner.vala b/src/core/runner.vala
index f87828f8..c432ddca 100644
--- a/src/core/runner.vala
+++ b/src/core/runner.vala
@@ -6,6 +6,7 @@ public interface Games.Runner : Object {
public abstract bool can_fullscreen { get; }
public abstract bool can_quit_safely { get; }
public abstract bool can_resume { get; }
+ public abstract bool supports_savestates { get; }
public abstract MediaSet? media_set { get; }
public abstract InputMode input_mode { get; set; }
diff --git a/src/dummy/dummy-runner.vala b/src/dummy/dummy-runner.vala
index 8434e2ae..3434727c 100644
--- a/src/dummy/dummy-runner.vala
+++ b/src/dummy/dummy-runner.vala
@@ -13,6 +13,10 @@ private class Games.DummyRunner : Object, Runner {
get { return false; }
}
+ public bool supports_savestates {
+ get { return false; }
+ }
+
public MediaSet? media_set {
get { return null; }
}
diff --git a/src/retro/retro-runner.vala b/src/retro/retro-runner.vala
index 4ddba679..432968f5 100644
--- a/src/retro/retro-runner.vala
+++ b/src/retro/retro-runner.vala
@@ -16,6 +16,10 @@ public class Games.RetroRunner : Object, Runner {
get { return game_savestates.length != 0; }
}
+ public bool supports_savestates {
+ get { return core.get_can_access_state (); }
+ }
+
private MediaSet _media_set;
public MediaSet? media_set {
get { return _media_set; }
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]