[gnome-games] wii-ware: Replace WiiWareGame by GenericGame



commit d5b19388782926069547856fe34ab6a5c7c09fec
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Fri Mar 25 07:19:44 2016 +0100

    wii-ware: Replace WiiWareGame by GenericGame
    
    Fixes #285

 plugins/wii-ware/src/Makefile.am          |    1 -
 plugins/wii-ware/src/wii-ware-game.vala   |   43 -----------------------------
 plugins/wii-ware/src/wii-ware-plugin.vala |    9 +++++-
 3 files changed, 8 insertions(+), 45 deletions(-)
---
diff --git a/plugins/wii-ware/src/Makefile.am b/plugins/wii-ware/src/Makefile.am
index b5fe049..bdf9a24 100644
--- a/plugins/wii-ware/src/Makefile.am
+++ b/plugins/wii-ware/src/Makefile.am
@@ -6,7 +6,6 @@ libgames_wii_ware_plugin_la_DEPENDENCIES = \
        $(NULL)
 
 libgames_wii_ware_plugin_la_SOURCES = \
-       wii-ware-game.vala \
        wii-ware-plugin.vala \
        $(NULL)
 
diff --git a/plugins/wii-ware/src/wii-ware-plugin.vala b/plugins/wii-ware/src/wii-ware-plugin.vala
index 499a971..30c944d 100644
--- a/plugins/wii-ware/src/wii-ware-plugin.vala
+++ b/plugins/wii-ware/src/wii-ware-plugin.vala
@@ -1,7 +1,9 @@
 // This file is part of GNOME Games. License: GPLv3
 
 private class Games.WiiWarePlugin : Object, Plugin {
+       private const string FINGERPRINT_PREFIX = "wii-ware";
        private const string MIME_TYPE = "application/x-wii-wad";
+       private const string MODULE_BASENAME = "libretro-wii.so";
 
        public GameSource get_game_source () throws Error {
                var query = new MimeTypeTrackerQuery (MIME_TYPE, game_for_uri);
@@ -13,7 +15,12 @@ private class Games.WiiWarePlugin : Object, Plugin {
        }
 
        private static Game game_for_uri (string uri) throws Error {
-               return new WiiWareGame (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]