[gnome-games/wip/exalm/psx-cleanup: 5/10] generic: Add GenericInputCapabilities



commit 4cfc344de410a4a9a54ed890d4943ec1e00d1465
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Mon Feb 10 15:50:37 2020 +0500

    generic: Add GenericInputCapabilities
    
    Since InputCapabilities only has one accessor now, the libretro and ms-dos
    implementations are exactly same. Unify them.

 src/generic/generic-input-capabilities.vala | 13 +++++++++++++
 src/meson.build                             |  1 +
 2 files changed, 14 insertions(+)
---
diff --git a/src/generic/generic-input-capabilities.vala b/src/generic/generic-input-capabilities.vala
new file mode 100644
index 00000000..9e24e6cb
--- /dev/null
+++ b/src/generic/generic-input-capabilities.vala
@@ -0,0 +1,13 @@
+// This file is part of GNOME Games. License: GPL-3.0+.
+
+public class Games.GenericInputCapabilities : Object, InputCapabilities {
+       private bool allow_keyboard_mode;
+
+       public GenericInputCapabilities (bool allow_keyboard_mode) {
+               this.allow_keyboard_mode = allow_keyboard_mode;
+       }
+
+       public bool get_allow_keyboard_mode () {
+               return allow_keyboard_mode;
+       }
+}
diff --git a/src/meson.build b/src/meson.build
index bf42cc8b..c751641c 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -64,6 +64,7 @@ vala_sources = [
 
   'generic/generic-game.vala',
   'generic/generic-game-uri-adapter.vala',
+  'generic/generic-input-capabilities.vala',
   'generic/generic-platform.vala',
   'generic/generic-runner-factory.vala',
   'generic/generic-title.vala',


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]