[gnome-games/wip/exalm/sharp-x68000: 199/203] tmp



commit c0a5d63bfadf71e037a0d128af81820e21f08544
Author: Exalm <exalm7659 gmail com>
Date:   Sat Apr 14 21:31:11 2018 +0000

    tmp

 flatpak/libretro-cores/px68k.libretro                   |  2 +-
 flatpak/org.gnome.Games.json                            |  3 ++-
 plugins/sharp-x68000/src/sharp-x68000-game-factory.vala | 11 ++++++-----
 plugins/sharp-x68000/src/sharp-x68000-plugin.vala       |  3 ++-
 4 files changed, 11 insertions(+), 8 deletions(-)
---
diff --git a/flatpak/libretro-cores/px68k.libretro b/flatpak/libretro-cores/px68k.libretro
index 72438648..06bc3190 100644
--- a/flatpak/libretro-cores/px68k.libretro
+++ b/flatpak/libretro-cores/px68k.libretro
@@ -8,7 +8,7 @@ Authors=hissorii;
 License=???;
 
 [Platform:SharpX68000]
-MimeType=application/x-x68k-rom;application/x-x68k-xdf-rom;
+MimeType=application/x-x68k-rom;application/x-x68k-xdf-rom;application/x-x68k-hdf-rom;
 Firmwares=CGROM;IPLROM;IPL30ROM;
 
 [Firmware:CGROM]
diff --git a/flatpak/org.gnome.Games.json b/flatpak/org.gnome.Games.json
index 27436168..edd397b6 100644
--- a/flatpak/org.gnome.Games.json
+++ b/flatpak/org.gnome.Games.json
@@ -165,7 +165,8 @@
             "sources" : [
                 {
                     "type" : "git",
-                    "url" : "https://gitlab.gnome.org/GNOME/grilo-plugins.git";
+                    "url" : "https://gitlab.gnome.org/exalm/grilo-plugins.git";,
+                    "branch" : "x68k"
                 }
             ],
             "cleanup" : [
diff --git a/plugins/sharp-x68000/src/sharp-x68000-game-factory.vala 
b/plugins/sharp-x68000/src/sharp-x68000-game-factory.vala
index ccbbfca4..ff120471 100644
--- a/plugins/sharp-x68000/src/sharp-x68000-game-factory.vala
+++ b/plugins/sharp-x68000/src/sharp-x68000-game-factory.vala
@@ -4,6 +4,8 @@ public class Games.SharpX68000GameFactory : Object, UriGameFactory {
        private const string FINGERPRINT_PREFIX = "sharp-x68000";
        private const string MIME_TYPE_DIM = "application/x-x68k-rom";
        private const string MIME_TYPE_XDF = "application/x-x68k-xdf-rom";
+       private const string MIME_TYPE_HDF = "application/x-x68k-hdf-rom";
+       private const string MIME_TYPE_TGDB = "application/x-sharp-x68000-rom";
        private const string PLATFORM = "SharpX68000";
        private const string ICON_NAME = "media-floppy-symbolic";
 
@@ -23,7 +25,7 @@ public class Games.SharpX68000GameFactory : Object, UriGameFactory {
        }
 
        public string[] get_mime_types () {
-               return { MIME_TYPE_DIM, MIME_TYPE_XDF };
+               return { MIME_TYPE_DIM, MIME_TYPE_XDF, MIME_TYPE_HDF };
        }
 
        public async Game? query_game_for_uri (Uri uri) {
@@ -53,7 +55,7 @@ public class Games.SharpX68000GameFactory : Object, UriGameFactory {
                var file_info = file.query_info (FileAttribute.STANDARD_CONTENT_TYPE, 
FileQueryInfoFlags.NONE);
                var mime_type = file_info.get_content_type ();
 
-               if (mime_type != MIME_TYPE_DIM && mime_type != MIME_TYPE_XDF)
+               if (mime_type != MIME_TYPE_DIM && mime_type != MIME_TYPE_XDF && mime_type != MIME_TYPE_HDF)
                        return;
 
                var path = file.get_path ();
@@ -158,14 +160,13 @@ public class Games.SharpX68000GameFactory : Object, UriGameFactory {
                var uid = new FingerprintUid (uri, FINGERPRINT_PREFIX);
                var title = new FilenameTitle (uri);
                var icon = new DummyIcon ();
-               var media = new GriloMedia (title, mime_type);
+               var media = new GriloMedia (title, MIME_TYPE_TGDB);
                var cover = new CompositeCover ({
                        new LocalCover (uri),
                        new GriloCover (media, uid)});
                var core_source = new RetroCoreSource (PLATFORM, get_mime_types ());
                RetroRunner runner = new RetroRunner.for_media_set (core_source, media_set, uid, title);
 
-               print (uri.to_string ());
                return new GenericGame (title, icon, cover, runner);
        }
 
@@ -173,7 +174,7 @@ public class Games.SharpX68000GameFactory : Object, UriGameFactory {
                var uid = new FingerprintUid (uri, FINGERPRINT_PREFIX);
                var title = new FilenameTitle (uri);
                var icon = new DummyIcon ();
-               var media = new GriloMedia (title, mime_type);
+               var media = new GriloMedia (title, MIME_TYPE_TGDB);
                var cover = new CompositeCover ({
                        new LocalCover (uri),
                        new GriloCover (media, uid)});
diff --git a/plugins/sharp-x68000/src/sharp-x68000-plugin.vala 
b/plugins/sharp-x68000/src/sharp-x68000-plugin.vala
index a13beb9d..11fefadf 100644
--- a/plugins/sharp-x68000/src/sharp-x68000-plugin.vala
+++ b/plugins/sharp-x68000/src/sharp-x68000-plugin.vala
@@ -3,9 +3,10 @@
 private class Games.SharpX68000Plugin : Object, Plugin {
        private const string MIME_TYPE_DIM = "application/x-x68k-rom";
        private const string MIME_TYPE_XDF = "application/x-x68k-xdf-rom";
+       private const string MIME_TYPE_HDF = "application/x-x68k-hdf-rom";
 
        public string[] get_mime_types () {
-               return { MIME_TYPE_DIM, MIME_TYPE_XDF };
+               return { MIME_TYPE_DIM, MIME_TYPE_XDF, MIME_TYPE_HDF };
        }
 
        public UriGameFactory[] get_uri_game_factories () {


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