[gnome-games/wip/exalm/rebrand: 72/124] ms-dos: Use RetroSimpleGameUriAdapter




commit 82cd3784f7772dd83003a5875924a45e0bc78187
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Tue Mar 30 02:08:28 2021 +0500

    ms-dos: Use RetroSimpleGameUriAdapter

 plugins/ms-dos/src/ms-dos-plugin.vala | 16 +---------------
 1 file changed, 1 insertion(+), 15 deletions(-)
---
diff --git a/plugins/ms-dos/src/ms-dos-plugin.vala b/plugins/ms-dos/src/ms-dos-plugin.vala
index a9e3eb19..a3e49841 100644
--- a/plugins/ms-dos/src/ms-dos-plugin.vala
+++ b/plugins/ms-dos/src/ms-dos-plugin.vala
@@ -18,26 +18,12 @@ private class Games.MsDosPlugin : Object, Plugin {
        }
 
        public UriGameFactory[] get_uri_game_factories () {
-               var game_uri_adapter = new GenericGameUriAdapter (game_for_uri);
+               var game_uri_adapter = new RetroSimpleGameUriAdapter (platform);
                var factory = new GenericUriGameFactory (game_uri_adapter);
                factory.add_mime_type (MIME_TYPE);
 
                return { factory };
        }
-
-       private static Game game_for_uri (Uri uri) throws Error {
-               var uid = new Uid (Fingerprint.get_uid (uri, PLATFORM_UID_PREFIX));
-               var title = new FilenameTitle (uri);
-               var media = new GriloMedia (title, MIME_TYPE);
-               var cover = new CompositeCover ({
-                       new LocalCover (uri),
-                       new GriloCover (media, uid)});
-
-               var game = new Game (uid, uri, title, platform);
-               game.set_cover (cover);
-
-               return game;
-       }
 }
 
 [ModuleInit]


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]