[gnome-games] nintendo-ds: Replace NintendoDsGame by GenericGame



commit 886fea6a94fd81168fc6f90f1cfd30405beff03e
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Fri Mar 25 07:04:48 2016 +0100

    nintendo-ds: Replace NintendoDsGame by GenericGame

 plugins/nintendo-ds/src/Makefile.am             |    1 -
 plugins/nintendo-ds/src/nintendo-ds-game.vala   |   43 -----------------------
 plugins/nintendo-ds/src/nintendo-ds-plugin.vala |    9 ++++-
 3 files changed, 8 insertions(+), 45 deletions(-)
---
diff --git a/plugins/nintendo-ds/src/Makefile.am b/plugins/nintendo-ds/src/Makefile.am
index 713fab9..d058157 100644
--- a/plugins/nintendo-ds/src/Makefile.am
+++ b/plugins/nintendo-ds/src/Makefile.am
@@ -6,7 +6,6 @@ libgames_nintendo_ds_plugin_la_DEPENDENCIES = \
        $(NULL)
 
 libgames_nintendo_ds_plugin_la_SOURCES = \
-       nintendo-ds-game.vala \
        nintendo-ds-plugin.vala \
        $(NULL)
 
diff --git a/plugins/nintendo-ds/src/nintendo-ds-plugin.vala b/plugins/nintendo-ds/src/nintendo-ds-plugin.vala
index 6af4418..333e975 100644
--- a/plugins/nintendo-ds/src/nintendo-ds-plugin.vala
+++ b/plugins/nintendo-ds/src/nintendo-ds-plugin.vala
@@ -1,7 +1,9 @@
 // This file is part of GNOME Games. License: GPLv3
 
 private class Games.NintendoDsPlugin : Object, Plugin {
+       private const string FINGERPRINT_PREFIX = "nintendo-ds";
        private const string MIME_TYPE = "application/x-nintendo-ds-rom";
+       private const string MODULE_BASENAME = "libretro-nintendo-ds.so";
 
        public GameSource get_game_source () throws Error {
                var query = new MimeTypeTrackerQuery (MIME_TYPE, game_for_uri);
@@ -13,7 +15,12 @@ private class Games.NintendoDsPlugin : Object, Plugin {
        }
 
        private static Game game_for_uri (string uri) throws Error {
-               return new NintendoDsGame (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]