[gnome-games/wip/exalm/sharp-x68000: 16/16] d
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/wip/exalm/sharp-x68000: 16/16] d
- Date: Fri, 30 Nov 2018 15:51:26 +0000 (UTC)
commit bfd7490b626c706914674d36e7be8d04766ffdc0
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date: Wed Nov 28 19:59:37 2018 +0500
d
plugins/sharp-x68000/src/meson.build | 1 +
.../src/sharp-x68000-game-factory.vala | 23 +++++++++++-----------
.../src/sharp-x68000-input-capabilities.vala | 13 ++++++++++++
3 files changed, 26 insertions(+), 11 deletions(-)
---
diff --git a/plugins/sharp-x68000/src/meson.build b/plugins/sharp-x68000/src/meson.build
index abcb1f83..09dc2c80 100644
--- a/plugins/sharp-x68000/src/meson.build
+++ b/plugins/sharp-x68000/src/meson.build
@@ -1,5 +1,6 @@
vala_sources = [
'sharp-x68000-game-factory.vala',
+ 'sharp-x68000-input-capabilities.vala',
'sharp-x68000-plugin.vala',
]
diff --git a/plugins/sharp-x68000/src/sharp-x68000-game-factory.vala
b/plugins/sharp-x68000/src/sharp-x68000-game-factory.vala
index 75ebbf51..086e57f1 100644
--- a/plugins/sharp-x68000/src/sharp-x68000-game-factory.vala
+++ b/plugins/sharp-x68000/src/sharp-x68000-game-factory.vala
@@ -166,16 +166,17 @@ public class Games.SharpX68000GameFactory : Object, UriGameFactory {
var cover = new CompositeCover ({
new LocalCover (uri),
new GriloCover (media, uid)});
- var release_date = new GriloReleaseDate (media, uid);
- var cooperative = new GriloCooperative (media, uid);
- var genre = new GriloGenre (media, uid);
- var players = new GriloPlayers (media, uid);
+ var release_date = new GriloReleaseDate (media);
+ var cooperative = new GriloCooperative (media);
+ var genre = new GriloGenre (media);
+ var players = new GriloPlayers (media);
var developer = new GriloDeveloper (media);
var publisher = new GriloPublisher (media);
var description = new GriloDescription (media);
var rating = new GriloRating (media);
var core_source = new RetroCoreSource (platform, get_mime_types ());
- RetroRunner runner = new RetroRunner.for_media_set (core_source, media_set, uid, title);
+ var input_capabilities = new SharpX68000InputCapabilities ();
+ var runner = new RetroRunner.for_media_set (core_source, media_set, uid, title,
input_capabilities);
var game = new GenericGame (uid, title, platform, runner);
game.set_cover (cover);
@@ -194,21 +195,21 @@ public class Games.SharpX68000GameFactory : Object, UriGameFactory {
private Game create_game (Uri uri, string mime_type) throws Error {
var uid = new FingerprintUid (uri, FINGERPRINT_PREFIX);
var title = new FilenameTitle (uri);
- var icon = new DummyIcon ();
var media = new GriloMedia (title, MIME_TYPE_TGDB);
var cover = new CompositeCover ({
new LocalCover (uri),
new GriloCover (media, uid)});
- var release_date = new GriloReleaseDate (media, uid);
- var cooperative = new GriloCooperative (media, uid);
- var genre = new GriloGenre (media, uid);
- var players = new GriloPlayers (media, uid);
+ var release_date = new GriloReleaseDate (media);
+ var cooperative = new GriloCooperative (media);
+ var genre = new GriloGenre (media);
+ var players = new GriloPlayers (media);
var developer = new GriloDeveloper (media);
var publisher = new GriloPublisher (media);
var description = new GriloDescription (media);
var rating = new GriloRating (media);
var core_source = new RetroCoreSource (platform, get_mime_types ());
- RetroRunner runner = new RetroRunner (core_source, uri, uid, title);
+ var input_capabilities = new SharpX68000InputCapabilities ();
+ var runner = new RetroRunner (core_source, uri, uid, title, input_capabilities);
var game = new GenericGame (uid, title, platform, runner);
game.set_cover (cover);
diff --git a/plugins/sharp-x68000/src/sharp-x68000-input-capabilities.vala
b/plugins/sharp-x68000/src/sharp-x68000-input-capabilities.vala
new file mode 100644
index 00000000..8f6989a1
--- /dev/null
+++ b/plugins/sharp-x68000/src/sharp-x68000-input-capabilities.vala
@@ -0,0 +1,13 @@
+public class Games.SharpX68000InputCapabilities : Object, InputCapabilities {
+ public bool get_allow_classic_gamepads () throws Error {
+ return true;
+ }
+
+ public bool get_allow_analog_gamepads () throws Error {
+ return true;
+ }
+
+ public bool get_allow_keyboard_mode () {
+ return true;
+ }
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]