[gnome-games] runner: Add get_available_input_modes() method
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] runner: Add get_available_input_modes() method
- Date: Tue, 20 Nov 2018 01:43:15 +0000 (UTC)
commit c403879d97ac3a9b98414ff6b3d2c572370fc380
Author: Yetizone <andreii lisita gmail com>
Date: Sun Nov 18 20:32:36 2018 +0200
runner: Add get_available_input_modes() method
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 a78c3b15..43257f61 100644
--- a/src/command/command-runner.vala
+++ b/src/command/command-runner.vala
@@ -77,4 +77,8 @@ public class Games.CommandRunner : Object, Runner {
public void stop () {
}
+
+ public InputMode[] get_available_input_modes () {
+ return { };
+ }
}
diff --git a/src/core/runner.vala b/src/core/runner.vala
index ad902629..48815af9 100644
--- a/src/core/runner.vala
+++ b/src/core/runner.vala
@@ -15,4 +15,5 @@ public interface Games.Runner : Object {
public abstract void resume () throws Error;
public abstract void pause ();
public abstract void stop ();
+ public abstract InputMode[] get_available_input_modes ();
}
diff --git a/src/dummy/dummy-runner.vala b/src/dummy/dummy-runner.vala
index bd32a687..935429f8 100644
--- a/src/dummy/dummy-runner.vala
+++ b/src/dummy/dummy-runner.vala
@@ -43,4 +43,8 @@ private class Games.DummyRunner : Object, Runner {
public void stop () {
}
+
+ public InputMode[] get_available_input_modes () {
+ return { };
+ }
}
diff --git a/src/retro/retro-runner.vala b/src/retro/retro-runner.vala
index 88435b75..642762be 100644
--- a/src/retro/retro-runner.vala
+++ b/src/retro/retro-runner.vala
@@ -318,6 +318,10 @@ public class Games.RetroRunner : Object, Runner {
stopped ();
}
+ public InputMode[] get_available_input_modes () {
+ return { InputMode.GAMEPAD, InputMode.KEYBOARD };
+ }
+
private void on_media_number_changed () {
if (!is_initialized)
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]