[gnome-games] snes: Replace SnesGame by GenericGame
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] snes: Replace SnesGame by GenericGame
- Date: Fri, 25 Mar 2016 06:46:03 +0000 (UTC)
commit f6696081cbe4c8c15132a1924924dd195c2456ad
Author: Adrien Plazas <kekun plazas laposte net>
Date: Fri Mar 25 07:20:25 2016 +0100
snes: Replace SnesGame by GenericGame
plugins/snes/src/Makefile.am | 1 -
plugins/snes/src/snes-game.vala | 75 -------------------------------------
plugins/snes/src/snes-plugin.vala | 9 ++++-
3 files changed, 8 insertions(+), 77 deletions(-)
---
diff --git a/plugins/snes/src/Makefile.am b/plugins/snes/src/Makefile.am
index 2d56214..043fb4c 100644
--- a/plugins/snes/src/Makefile.am
+++ b/plugins/snes/src/Makefile.am
@@ -6,7 +6,6 @@ libgames_snes_plugin_la_DEPENDENCIES = \
$(NULL)
libgames_snes_plugin_la_SOURCES = \
- snes-game.vala \
snes-plugin.vala \
$(NULL)
diff --git a/plugins/snes/src/snes-plugin.vala b/plugins/snes/src/snes-plugin.vala
index ace50bb..5a4c91c 100644
--- a/plugins/snes/src/snes-plugin.vala
+++ b/plugins/snes/src/snes-plugin.vala
@@ -1,7 +1,9 @@
// This file is part of GNOME Games. License: GPLv3
private class Games.SnesPlugin : Object, Plugin {
+ private const string FINGERPRINT_PREFIX = "snes";
private const string MIME_TYPE = "application/vnd.nintendo.snes.rom";
+ private const string MODULE_BASENAME = "libretro-snes.so";
public GameSource get_game_source () throws Error {
var query = new MimeTypeTrackerQuery (MIME_TYPE, game_for_uri);
@@ -13,7 +15,12 @@ private class Games.SnesPlugin : Object, Plugin {
}
private static Game game_for_uri (string uri) throws Error {
- return new SnesGame (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]