[gnome-games/wip/exalm/uid: 7/18] libretro: Remove LibretroUid



commit bb8fb613973c28601720ce6c20a4ed68b00d45f1
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Fri Feb 21 16:22:40 2020 +0500

    libretro: Remove LibretroUid
    
    Replace it with GenericUid and a simple function.

 plugins/libretro/src/libretro-plugin.vala |  8 +++++++-
 plugins/libretro/src/libretro-uid.vala    | 15 ---------------
 plugins/libretro/src/meson.build          |  1 -
 3 files changed, 7 insertions(+), 17 deletions(-)
---
diff --git a/plugins/libretro/src/libretro-plugin.vala b/plugins/libretro/src/libretro-plugin.vala
index ebe1680f..b4a65fec 100644
--- a/plugins/libretro/src/libretro-plugin.vala
+++ b/plugins/libretro/src/libretro-plugin.vala
@@ -51,10 +51,16 @@ private class Games.LibretroPlugin : Object, Plugin {
                return core_descriptor;
        }
 
+       private static string get_uid (Retro.CoreDescriptor core_descriptor) {
+               var id = core_descriptor.get_id ();
+
+               return @"$PLATFORM_UID_PREFIX-$id";
+       }
+
        private static Game game_for_uri (Uri uri) throws Error {
                var core_descriptor = get_core_descriptor (uri);
 
-               var uid = new LibretroUid (core_descriptor);
+               var uid = new GenericUid (get_uid (core_descriptor));
                var title = new LibretroTitle (core_descriptor);
                var icon = new LibretroIcon (core_descriptor);
 
diff --git a/plugins/libretro/src/meson.build b/plugins/libretro/src/meson.build
index e8569b93..05f2c9cb 100644
--- a/plugins/libretro/src/meson.build
+++ b/plugins/libretro/src/meson.build
@@ -3,7 +3,6 @@ vala_sources = [
   'libretro-icon.vala',
   'libretro-plugin.vala',
   'libretro-title.vala',
-  'libretro-uid.vala',
   'libretro-uri-iterator.vala',
   'libretro-uri-source.vala',
 ]


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