[gnome-games/wip/exalm/rebrand: 51/124] generic-input-capabilities: Merge into InputCapabilities
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/wip/exalm/rebrand: 51/124] generic-input-capabilities: Merge into InputCapabilities
- Date: Sat, 19 Jun 2021 14:37:44 +0000 (UTC)
commit 24ad772207b74db4a3ac8d935e8f5ba23b39fa9f
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Mon Mar 29 21:59:47 2021 +0500
generic-input-capabilities: Merge into InputCapabilities
plugins/ms-dos/src/ms-dos-runner.vala | 2 +-
src/core/input-capabilities.vala | 19 ++++++++++++++++---
src/generic/generic-input-capabilities.vala | 19 -------------------
src/meson.build | 1 -
4 files changed, 17 insertions(+), 24 deletions(-)
---
diff --git a/plugins/ms-dos/src/ms-dos-runner.vala b/plugins/ms-dos/src/ms-dos-runner.vala
index a14c7d4f..01a8ba4c 100644
--- a/plugins/ms-dos/src/ms-dos-runner.vala
+++ b/plugins/ms-dos/src/ms-dos-runner.vala
@@ -6,6 +6,6 @@ private class Games.MsDosRunner : Runner {
}
construct {
- input_capabilities = new GenericInputCapabilities (true, false);
+ input_capabilities = new InputCapabilities (true, false);
}
}
diff --git a/src/core/input-capabilities.vala b/src/core/input-capabilities.vala
index 93ba9d86..7467c738 100644
--- a/src/core/input-capabilities.vala
+++ b/src/core/input-capabilities.vala
@@ -1,6 +1,19 @@
// This file is part of GNOME Games. License: GPL-3.0+.
-public interface Games.InputCapabilities : Object {
- public abstract bool get_allow_keyboard_mode ();
- public abstract bool get_allow_gamepad_mode ();
+public class Games.InputCapabilities : Object {
+ private bool allow_keyboard_mode;
+ private bool allow_gamepad_mode;
+
+ public InputCapabilities (bool allow_keyboard_mode, bool allow_gamepad_mode = true) {
+ this.allow_keyboard_mode = allow_keyboard_mode;
+ this.allow_gamepad_mode = allow_gamepad_mode;
+ }
+
+ public bool get_allow_keyboard_mode () {
+ return allow_keyboard_mode;
+ }
+
+ public bool get_allow_gamepad_mode () {
+ return allow_gamepad_mode;
+ }
}
diff --git a/src/meson.build b/src/meson.build
index 213f78da..e41e2e4d 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -75,7 +75,6 @@ vala_sources = [
'gamepad/gamepad-tester.vala',
'generic/generic-game-uri-adapter.vala',
- 'generic/generic-input-capabilities.vala',
'generic/generic-title.vala',
'generic/generic-uri-game-factory.vala',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]