[gnome-games/wip/exalm/retro-runner: 3/6] plugins: Use RetroRunnerBuilder
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/wip/exalm/retro-runner: 3/6] plugins: Use RetroRunnerBuilder
- Date: Thu, 3 Jan 2019 22:06:51 +0000 (UTC)
commit a93069cb01ef4c1bb029e15aae317dcbe63148c7
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date: Fri Jan 4 03:03:16 2019 +0500
plugins: Use RetroRunnerBuilder
plugins/dreamcast/src/dreamcast-plugin.vala | 8 +++++++-
plugins/game-cube/src/game-cube-plugin.vala | 8 +++++++-
plugins/libretro/src/libretro-plugin.vala | 9 ++++++++-
plugins/mame/src/mame-game-uri-adapter.vala | 8 +++++++-
plugins/ms-dos/src/ms-dos-plugin.vala | 9 ++++++++-
plugins/nintendo-ds/src/nintendo-ds-plugin.vala | 8 +++++++-
plugins/playstation/src/playstation-game-factory.vala | 9 ++++++++-
plugins/sega-cd/src/sega-cd-plugin.vala | 8 +++++++-
plugins/sega-saturn/src/sega-saturn-plugin.vala | 8 +++++++-
plugins/turbografx-cd/src/turbografx-cd-plugin.vala | 8 +++++++-
plugins/virtual-boy/src/virtual-boy-plugin.vala | 8 +++++++-
plugins/wii/src/wii-plugin.vala | 8 +++++++-
12 files changed, 87 insertions(+), 12 deletions(-)
---
diff --git a/plugins/dreamcast/src/dreamcast-plugin.vala b/plugins/dreamcast/src/dreamcast-plugin.vala
index 98e299a0..cf20a234 100644
--- a/plugins/dreamcast/src/dreamcast-plugin.vala
+++ b/plugins/dreamcast/src/dreamcast-plugin.vala
@@ -43,7 +43,13 @@ private class Games.DreamcastPlugin : Object, Plugin {
var description = new GriloDescription (media);
var rating = new GriloRating (media);
var core_source = new RetroCoreSource (platform, { MIME_TYPE });
- var runner = new RetroRunner (core_source, uri, uid, title);
+
+ var builder = new RetroRunnerBuilder ();
+ builder.core_source = core_source;
+ builder.uri = uri;
+ builder.uid = uid;
+ builder.title = title;
+ var runner = builder.to_runner ();
var game = new GenericGame (uid, title, platform, runner);
game.set_cover (cover);
diff --git a/plugins/game-cube/src/game-cube-plugin.vala b/plugins/game-cube/src/game-cube-plugin.vala
index cf53e3b1..b05cb103 100644
--- a/plugins/game-cube/src/game-cube-plugin.vala
+++ b/plugins/game-cube/src/game-cube-plugin.vala
@@ -43,7 +43,13 @@ private class Games.GameCubePlugin : Object, Plugin {
var description = new GriloDescription (media);
var rating = new GriloRating (media);
var core_source = new RetroCoreSource (platform, { MIME_TYPE });
- var runner = new RetroRunner (core_source, uri, uid, title);
+
+ var builder = new RetroRunnerBuilder ();
+ builder.core_source = core_source;
+ builder.uri = uri;
+ builder.uid = uid;
+ builder.title = title;
+ var runner = builder.to_runner ();
var game = new GenericGame (uid, title, platform, runner);
game.set_cover (cover);
diff --git a/plugins/libretro/src/libretro-plugin.vala b/plugins/libretro/src/libretro-plugin.vala
index 0b8df6f9..0ba4c557 100644
--- a/plugins/libretro/src/libretro-plugin.vala
+++ b/plugins/libretro/src/libretro-plugin.vala
@@ -40,7 +40,14 @@ private class Games.LibretroPlugin : Object, Plugin {
var title = new LibretroTitle (core_descriptor);
var icon = new LibretroIcon (core_descriptor);
var input_capabilities = new LibretroInputCapabilities ();
- var runner = new RetroRunner.for_core_descriptor_and_platform (core_descriptor, platform,
uid, title, input_capabilities);
+
+ var builder = new RetroRunnerBuilder ();
+ builder.core_descriptor = core_descriptor;
+ builder.platform = platform;
+ builder.uid = uid;
+ builder.title = title;
+ builder.input_capabilities = input_capabilities;
+ var runner = builder.to_runner ();
var game = new GenericGame (uid, title, platform, runner);
game.set_icon (icon);
diff --git a/plugins/mame/src/mame-game-uri-adapter.vala b/plugins/mame/src/mame-game-uri-adapter.vala
index 278a356c..b03e0223 100644
--- a/plugins/mame/src/mame-game-uri-adapter.vala
+++ b/plugins/mame/src/mame-game-uri-adapter.vala
@@ -32,7 +32,13 @@ private class Games.MameGameUriAdapter : GameUriAdapter, Object {
var cover = new LocalCover (uri);
var developer = new GenericDeveloper (info.company);
var core_source = new RetroCoreSource (platform, { SEARCHED_MIME_TYPE, SPECIFIC_MIME_TYPE });
- var runner = new RetroRunner (core_source, uri, uid, title);
+
+ var builder = new RetroRunnerBuilder ();
+ builder.core_source = core_source;
+ builder.uri = uri;
+ builder.uid = uid;
+ builder.title = title;
+ var runner = builder.to_runner ();
Idle.add (this.game_for_uri.callback);
yield;
diff --git a/plugins/ms-dos/src/ms-dos-plugin.vala b/plugins/ms-dos/src/ms-dos-plugin.vala
index 8d3c69fc..35d8b57f 100644
--- a/plugins/ms-dos/src/ms-dos-plugin.vala
+++ b/plugins/ms-dos/src/ms-dos-plugin.vala
@@ -38,7 +38,14 @@ private class Games.MsDosPlugin : Object, Plugin {
var core_source = new RetroCoreSource (platform, { MIME_TYPE });
var input_capabilities = new MsDosInputCapabilities();
- var runner = new RetroRunner (core_source, uri, uid, title, input_capabilities);
+
+ var builder = new RetroRunnerBuilder ();
+ builder.core_source = core_source;
+ builder.uri = uri;
+ builder.uid = uid;
+ builder.title = title;
+ builder.input_capabilities = input_capabilities;
+ var runner = builder.to_runner ();
var game = new GenericGame (uid, title, platform, runner);
game.set_cover (cover);
diff --git a/plugins/nintendo-ds/src/nintendo-ds-plugin.vala b/plugins/nintendo-ds/src/nintendo-ds-plugin.vala
index 65f460cb..c0f08bba 100644
--- a/plugins/nintendo-ds/src/nintendo-ds-plugin.vala
+++ b/plugins/nintendo-ds/src/nintendo-ds-plugin.vala
@@ -41,7 +41,13 @@ private class Games.NintendoDsPlugin : Object, Plugin {
new LocalCover (uri),
new GriloCover (media, uid)});
var core_source = new RetroCoreSource (platform, { MIME_TYPE });
- var runner = new RetroRunner (core_source, uri, uid, title);
+
+ var builder = new RetroRunnerBuilder ();
+ builder.core_source = core_source;
+ builder.uri = uri;
+ builder.uid = uid;
+ builder.title = title;
+ var runner = builder.to_runner ();
var game = new GenericGame (uid, title, platform, runner);
game.set_icon (icon);
diff --git a/plugins/playstation/src/playstation-game-factory.vala
b/plugins/playstation/src/playstation-game-factory.vala
index 742011c1..7df8018d 100644
--- a/plugins/playstation/src/playstation-game-factory.vala
+++ b/plugins/playstation/src/playstation-game-factory.vala
@@ -152,7 +152,14 @@ public class Games.PlayStationGameFactory : Object, UriGameFactory {
var rating = new GriloRating (media);
var input_capabilities = new GameinfoDiscIdInputCapabilities (gameinfo, disc_set_id);
var core_source = new RetroCoreSource (platform, { CUE_MIME_TYPE, PHONY_MIME_TYPE });
- var runner = new RetroRunner.for_media_set (core_source, media_set, uid, title,
input_capabilities);
+
+ var builder = new RetroRunnerBuilder ();
+ builder.core_source = core_source;
+ builder.media_set = media_set;
+ builder.uid = uid;
+ builder.title = title;
+ builder.input_capabilities = input_capabilities;
+ var runner = builder.to_runner ();
var game = new GenericGame (uid, title, platform, runner);
game.set_cover (cover);
diff --git a/plugins/sega-cd/src/sega-cd-plugin.vala b/plugins/sega-cd/src/sega-cd-plugin.vala
index 28600955..8201b939 100644
--- a/plugins/sega-cd/src/sega-cd-plugin.vala
+++ b/plugins/sega-cd/src/sega-cd-plugin.vala
@@ -87,7 +87,13 @@ private class Games.SegaCDPlugin : Object, Plugin {
var description = new GriloDescription (media);
var rating = new GriloRating (media);
var core_source = new RetroCoreSource (platform, mime_types);
- var runner = new RetroRunner (core_source, uri, uid, title);
+
+ var builder = new RetroRunnerBuilder ();
+ builder.core_source = core_source;
+ builder.uri = uri;
+ builder.uid = uid;
+ builder.title = title;
+ var runner = builder.to_runner ();
var game = new GenericGame (uid, title, platform, runner);
game.set_cover (cover);
diff --git a/plugins/sega-saturn/src/sega-saturn-plugin.vala b/plugins/sega-saturn/src/sega-saturn-plugin.vala
index 8752ebb3..80b4ecd5 100644
--- a/plugins/sega-saturn/src/sega-saturn-plugin.vala
+++ b/plugins/sega-saturn/src/sega-saturn-plugin.vala
@@ -66,7 +66,13 @@ private class Games.SegaSaturnPlugin : Object, Plugin {
var description = new GriloDescription (media);
var rating = new GriloRating (media);
var core_source = new RetroCoreSource (platform, { CUE_MIME_TYPE, SEGA_SATURN_MIME_TYPE });
- var runner = new RetroRunner (core_source, uri, uid, title);
+
+ var builder = new RetroRunnerBuilder ();
+ builder.core_source = core_source;
+ builder.uri = uri;
+ builder.uid = uid;
+ builder.title = title;
+ var runner = builder.to_runner ();
var game = new GenericGame (uid, title, platform, runner);
game.set_cover (cover);
diff --git a/plugins/turbografx-cd/src/turbografx-cd-plugin.vala
b/plugins/turbografx-cd/src/turbografx-cd-plugin.vala
index 9e27b8e9..fc1f72f4 100644
--- a/plugins/turbografx-cd/src/turbografx-cd-plugin.vala
+++ b/plugins/turbografx-cd/src/turbografx-cd-plugin.vala
@@ -46,7 +46,13 @@ private class Games.TurboGrafxCDPlugin : Object, Plugin {
var description = new GriloDescription (media);
var rating = new GriloRating (media);
var core_source = new RetroCoreSource (platform, { CUE_MIME_TYPE, PHONY_MIME_TYPE });
- var runner = new RetroRunner (core_source, uri, uid, title);
+
+ var builder = new RetroRunnerBuilder ();
+ builder.core_source = core_source;
+ builder.uri = uri;
+ builder.uid = uid;
+ builder.title = title;
+ var runner = builder.to_runner ();
var game = new GenericGame (uid, title, platform, runner);
game.set_cover (cover);
diff --git a/plugins/virtual-boy/src/virtual-boy-plugin.vala b/plugins/virtual-boy/src/virtual-boy-plugin.vala
index 88ac0400..c61c5bb5 100644
--- a/plugins/virtual-boy/src/virtual-boy-plugin.vala
+++ b/plugins/virtual-boy/src/virtual-boy-plugin.vala
@@ -45,7 +45,13 @@ private class Games.VirtualBoyPlugin : Object, Plugin {
var description = new GriloDescription (media);
var rating = new GriloRating (media);
var core_source = new RetroCoreSource (platform, { MIME_TYPE });
- var runner = new RetroRunner (core_source, uri, uid, title);
+
+ var builder = new RetroRunnerBuilder ();
+ builder.core_source = core_source;
+ builder.uri = uri;
+ builder.uid = uid;
+ builder.title = title;
+ var runner = builder.to_runner ();
var game = new GenericGame (uid, title, platform, runner);
game.set_cover (cover);
diff --git a/plugins/wii/src/wii-plugin.vala b/plugins/wii/src/wii-plugin.vala
index 591757ed..519d6552 100644
--- a/plugins/wii/src/wii-plugin.vala
+++ b/plugins/wii/src/wii-plugin.vala
@@ -43,7 +43,13 @@ private class Games.WiiPlugin : Object, Plugin {
var description = new GriloDescription (media);
var rating = new GriloRating (media);
var core_source = new RetroCoreSource (platform, { MIME_TYPE });
- var runner = new RetroRunner (core_source, uri, uid, title);
+
+ var builder = new RetroRunnerBuilder ();
+ builder.core_source = core_source;
+ builder.uri = uri;
+ builder.uid = uid;
+ builder.title = title;
+ var runner = builder.to_runner ();
var game = new GenericGame (uid, title, platform, runner);
game.set_cover (cover);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]