[gnome-games] nes: Replace NesGame by GenericGame
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] nes: Replace NesGame by GenericGame
- Date: Fri, 25 Mar 2016 06:45:43 +0000 (UTC)
commit ccfe64540800e48e6440b167867de21ba14fd863
Author: Adrien Plazas <kekun plazas laposte net>
Date: Fri Mar 25 07:03:00 2016 +0100
nes: Replace NesGame by GenericGame
plugins/nes/src/Makefile.am | 1 -
plugins/nes/src/nes-game.vala | 43 ---------------------------------------
plugins/nes/src/nes-plugin.vala | 9 +++++++-
3 files changed, 8 insertions(+), 45 deletions(-)
---
diff --git a/plugins/nes/src/Makefile.am b/plugins/nes/src/Makefile.am
index 8398396..020e34b 100644
--- a/plugins/nes/src/Makefile.am
+++ b/plugins/nes/src/Makefile.am
@@ -6,7 +6,6 @@ libgames_nes_plugin_la_DEPENDENCIES = \
$(NULL)
libgames_nes_plugin_la_SOURCES = \
- nes-game.vala \
nes-plugin.vala \
$(NULL)
diff --git a/plugins/nes/src/nes-plugin.vala b/plugins/nes/src/nes-plugin.vala
index d48deb2..7d3192b 100644
--- a/plugins/nes/src/nes-plugin.vala
+++ b/plugins/nes/src/nes-plugin.vala
@@ -1,7 +1,9 @@
// This file is part of GNOME Games. License: GPLv3
private class Games.NesPlugin : Object, Plugin {
+ private const string FINGERPRINT_PREFIX = "nes";
private const string MIME_TYPE = "application/x-nes-rom";
+ private const string MODULE_BASENAME = "libretro-nes.so";
public GameSource get_game_source () throws Error {
var query = new MimeTypeTrackerQuery (MIME_TYPE, game_for_uri);
@@ -13,7 +15,12 @@ private class Games.NesPlugin : Object, Plugin {
}
private static Game game_for_uri (string uri) throws Error {
- return new NesGame (uri);
+ var uid = new FingerprintUid (uri, FINGERPRINT_PREFIX);
+ var title = new FilenameTitle (uri);
+ var cover = new DummyCover ();
+ var runner = new RetroRunner (MODULE_BASENAME, uri, uid);
+
+ return new GenericGame (title, cover, runner);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]