[gnome-games/wip/exalm/platform-preferences: 59/70] retro: Add RetroPlatform



commit 31845bb29fa03f325547121981b65a1792ce1deb
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date:   Tue Sep 25 23:03:19 2018 +0500

    retro: Add RetroPlatform
    
    Introduce a specific platform for libretro-based games.
    
    This is just like GenericPlatform, except it also references platform's
    MIME type.
    
    This will be used later to provide a preference page with core chooser and
    firmware installer.

 src/meson.build               |  1 +
 src/retro/retro-platform.vala | 25 +++++++++++++++++++++++++
 2 files changed, 26 insertions(+)
---
diff --git a/src/meson.build b/src/meson.build
index 973bdd12..82759acf 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -114,6 +114,7 @@ vala_sources = [
   'retro/retro-gamepad.vala',
   'retro/retro-input-manager.vala',
   'retro/retro-options.vala',
+  'retro/retro-platform.vala',
   'retro/retro-runner.vala',
   'retro/retro-runner-builder.vala',
   'retro/retro-simple-game-uri-adapter.vala',
diff --git a/src/retro/retro-platform.vala b/src/retro/retro-platform.vala
new file mode 100644
index 00000000..9e4a80ec
--- /dev/null
+++ b/src/retro/retro-platform.vala
@@ -0,0 +1,25 @@
+// This file is part of GNOME Games. License: GPL-3.0+.
+
+public class Games.RetroPlatform : Object, Platform {
+       private string name;
+       private string id;
+       private string[] mime_types;
+
+       public RetroPlatform (string id, string name, string[] mime_types) {
+               this.id = id;
+               this.name = name;
+               this.mime_types = mime_types;
+       }
+
+       public string get_id () {
+               return id;
+       }
+
+       public string get_name () {
+               return name;
+       }
+
+       public string[] get_mime_types () {
+               return mime_types;
+       }
+}


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