[gnome-games/wip/exalm/platform-preferences: 16/36] retro: Add RetroPlatform
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/wip/exalm/platform-preferences: 16/36] retro: Add RetroPlatform
- Date: Mon, 7 Jan 2019 15:36:00 +0000 (UTC)
commit 4d7125b4ff1fcee0a234c474917f9087c9f47e77
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 b10bba39..ceb39ea0 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]