[gnome-games] nintendo-64: Replace Nintendo64Game by GenericGame



commit 6d56af6909936973f8f255b81b0da6f5c882678b
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Fri Mar 25 07:04:00 2016 +0100

    nintendo-64: Replace Nintendo64Game by GenericGame

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