[gnome-games/wip/exalm/loading: 1/29] runner: Store title as string
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/wip/exalm/loading: 1/29] runner: Store title as string
- Date: Mon, 11 Nov 2019 21:44:44 +0000 (UTC)
commit ecb6f67f3cc426982ea5f248f0a4059017e9e285
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Mon Nov 11 23:30:45 2019 +0500
runner: Store title as string
This will allow to create runners from Game objects which don't have
titles.
plugins/dreamcast/src/dreamcast-plugin.vala | 2 +-
plugins/game-cube/src/game-cube-plugin.vala | 2 +-
plugins/libretro/src/libretro-plugin.vala | 2 +-
plugins/mame/src/mame-game-uri-adapter.vala | 2 +-
plugins/ms-dos/src/ms-dos-plugin.vala | 2 +-
plugins/nintendo-ds/src/nintendo-ds-plugin.vala | 2 +-
plugins/playstation/src/playstation-game-factory.vala | 2 +-
plugins/sega-cd/src/sega-cd-plugin.vala | 2 +-
plugins/sega-saturn/src/sega-saturn-plugin.vala | 2 +-
plugins/turbografx-cd/src/turbografx-cd-plugin.vala | 2 +-
plugins/virtual-boy/src/virtual-boy-plugin.vala | 2 +-
plugins/wii/src/wii-plugin.vala | 2 +-
src/retro/retro-runner-builder.vala | 2 +-
src/retro/retro-runner.vala | 7 +++----
src/retro/retro-simple-game-uri-adapter.vala | 2 +-
15 files changed, 17 insertions(+), 18 deletions(-)
---
diff --git a/plugins/dreamcast/src/dreamcast-plugin.vala b/plugins/dreamcast/src/dreamcast-plugin.vala
index 1c7ad861..09a4ed2e 100644
--- a/plugins/dreamcast/src/dreamcast-plugin.vala
+++ b/plugins/dreamcast/src/dreamcast-plugin.vala
@@ -45,7 +45,7 @@ private class Games.DreamcastPlugin : Object, Plugin {
builder.core_source = core_source;
builder.uri = uri;
builder.uid = uid;
- builder.title = title;
+ builder.title = title.get_title ();
var runner = builder.to_runner ();
var game = new GenericGame (uid, title, platform, runner);
diff --git a/plugins/game-cube/src/game-cube-plugin.vala b/plugins/game-cube/src/game-cube-plugin.vala
index 360a9b16..41e59916 100644
--- a/plugins/game-cube/src/game-cube-plugin.vala
+++ b/plugins/game-cube/src/game-cube-plugin.vala
@@ -45,7 +45,7 @@ private class Games.GameCubePlugin : Object, Plugin {
builder.core_source = core_source;
builder.uri = uri;
builder.uid = uid;
- builder.title = title;
+ builder.title = title.get_title ();
var runner = builder.to_runner ();
var game = new GenericGame (uid, title, platform, runner);
diff --git a/plugins/libretro/src/libretro-plugin.vala b/plugins/libretro/src/libretro-plugin.vala
index 84008eb4..8a4542ef 100644
--- a/plugins/libretro/src/libretro-plugin.vala
+++ b/plugins/libretro/src/libretro-plugin.vala
@@ -50,7 +50,7 @@ private class Games.LibretroPlugin : Object, Plugin {
builder.core_descriptor = core_descriptor;
builder.platform = platform;
builder.uid = uid;
- builder.title = title;
+ builder.title = title.get_title ();
builder.input_capabilities = input_capabilities;
var runner = builder.to_runner ();
diff --git a/plugins/mame/src/mame-game-uri-adapter.vala b/plugins/mame/src/mame-game-uri-adapter.vala
index 48347a1f..1db1b00d 100644
--- a/plugins/mame/src/mame-game-uri-adapter.vala
+++ b/plugins/mame/src/mame-game-uri-adapter.vala
@@ -33,7 +33,7 @@ private class Games.MameGameUriAdapter : GameUriAdapter, Object {
builder.core_source = core_source;
builder.uri = uri;
builder.uid = uid;
- builder.title = title;
+ builder.title = title.get_title ();
var runner = builder.to_runner ();
Idle.add (this.game_for_uri.callback);
diff --git a/plugins/ms-dos/src/ms-dos-plugin.vala b/plugins/ms-dos/src/ms-dos-plugin.vala
index a851c9da..70f6e0b5 100644
--- a/plugins/ms-dos/src/ms-dos-plugin.vala
+++ b/plugins/ms-dos/src/ms-dos-plugin.vala
@@ -39,7 +39,7 @@ private class Games.MsDosPlugin : Object, Plugin {
builder.core_source = core_source;
builder.uri = uri;
builder.uid = uid;
- builder.title = title;
+ builder.title = title.get_title ();
builder.input_capabilities = input_capabilities;
var runner = builder.to_runner ();
diff --git a/plugins/nintendo-ds/src/nintendo-ds-plugin.vala b/plugins/nintendo-ds/src/nintendo-ds-plugin.vala
index e4e0ce14..4ec95b25 100644
--- a/plugins/nintendo-ds/src/nintendo-ds-plugin.vala
+++ b/plugins/nintendo-ds/src/nintendo-ds-plugin.vala
@@ -42,7 +42,7 @@ private class Games.NintendoDsPlugin : Object, Plugin {
builder.core_source = core_source;
builder.uri = uri;
builder.uid = uid;
- builder.title = title;
+ builder.title = title.get_title ();
var runner = builder.to_runner (typeof (NintendoDsRunner)) as NintendoDsRunner;
var game = new GenericGame (uid, title, platform, runner);
diff --git a/plugins/playstation/src/playstation-game-factory.vala
b/plugins/playstation/src/playstation-game-factory.vala
index cbb6be63..19dc0fb4 100644
--- a/plugins/playstation/src/playstation-game-factory.vala
+++ b/plugins/playstation/src/playstation-game-factory.vala
@@ -149,7 +149,7 @@ public class Games.PlayStationGameFactory : Object, UriGameFactory {
builder.core_source = core_source;
builder.media_set = media_set;
builder.uid = uid;
- builder.title = title;
+ builder.title = title.get_title ();
builder.input_capabilities = input_capabilities;
var runner = builder.to_runner ();
diff --git a/plugins/sega-cd/src/sega-cd-plugin.vala b/plugins/sega-cd/src/sega-cd-plugin.vala
index a82c9021..d3e3072c 100644
--- a/plugins/sega-cd/src/sega-cd-plugin.vala
+++ b/plugins/sega-cd/src/sega-cd-plugin.vala
@@ -86,7 +86,7 @@ private class Games.SegaCDPlugin : Object, Plugin {
builder.core_source = core_source;
builder.uri = uri;
builder.uid = uid;
- builder.title = title;
+ builder.title = title.get_title ();
var runner = builder.to_runner ();
var game = new GenericGame (uid, title, platform, runner);
diff --git a/plugins/sega-saturn/src/sega-saturn-plugin.vala b/plugins/sega-saturn/src/sega-saturn-plugin.vala
index 3f3ac026..b75ea788 100644
--- a/plugins/sega-saturn/src/sega-saturn-plugin.vala
+++ b/plugins/sega-saturn/src/sega-saturn-plugin.vala
@@ -69,7 +69,7 @@ private class Games.SegaSaturnPlugin : Object, Plugin {
builder.core_source = core_source;
builder.uri = uri;
builder.uid = uid;
- builder.title = title;
+ builder.title = title.get_title ();
var runner = builder.to_runner ();
var game = new GenericGame (uid, title, platform, runner);
diff --git a/plugins/turbografx-cd/src/turbografx-cd-plugin.vala
b/plugins/turbografx-cd/src/turbografx-cd-plugin.vala
index 5a6dabd8..28712335 100644
--- a/plugins/turbografx-cd/src/turbografx-cd-plugin.vala
+++ b/plugins/turbografx-cd/src/turbografx-cd-plugin.vala
@@ -48,7 +48,7 @@ private class Games.TurboGrafxCDPlugin : Object, Plugin {
builder.core_source = core_source;
builder.uri = uri;
builder.uid = uid;
- builder.title = title;
+ builder.title = title.get_title ();
var runner = builder.to_runner ();
var game = new GenericGame (uid, title, platform, runner);
diff --git a/plugins/virtual-boy/src/virtual-boy-plugin.vala b/plugins/virtual-boy/src/virtual-boy-plugin.vala
index 0142462e..13c0754e 100644
--- a/plugins/virtual-boy/src/virtual-boy-plugin.vala
+++ b/plugins/virtual-boy/src/virtual-boy-plugin.vala
@@ -46,7 +46,7 @@ private class Games.VirtualBoyPlugin : Object, Plugin {
builder.core_source = core_source;
builder.uri = uri;
builder.uid = uid;
- builder.title = title;
+ builder.title = title.get_title ();
var runner = builder.to_runner ();
var game = new GenericGame (uid, title, platform, runner);
diff --git a/plugins/wii/src/wii-plugin.vala b/plugins/wii/src/wii-plugin.vala
index d803f68c..fdc44413 100644
--- a/plugins/wii/src/wii-plugin.vala
+++ b/plugins/wii/src/wii-plugin.vala
@@ -45,7 +45,7 @@ private class Games.WiiPlugin : Object, Plugin {
builder.core_source = core_source;
builder.uri = uri;
builder.uid = uid;
- builder.title = title;
+ builder.title = title.get_title ();
var runner = builder.to_runner ();
var game = new GenericGame (uid, title, platform, runner);
diff --git a/src/retro/retro-runner-builder.vala b/src/retro/retro-runner-builder.vala
index 543c8c6e..02254598 100644
--- a/src/retro/retro-runner-builder.vala
+++ b/src/retro/retro-runner-builder.vala
@@ -2,7 +2,7 @@
public class Games.RetroRunnerBuilder : Object {
public Uid uid { get; set; }
- public Title title { get; set; }
+ public string title { get; set; }
private RetroCoreSource _core_source;
public RetroCoreSource core_source {
diff --git a/src/retro/retro-runner.vala b/src/retro/retro-runner.vala
index 2015ca9f..f80a8db1 100644
--- a/src/retro/retro-runner.vala
+++ b/src/retro/retro-runner.vala
@@ -46,7 +46,7 @@ public class Games.RetroRunner : Object, Runner {
private Uid uid;
private InputCapabilities input_capabilities;
private Settings settings;
- private Title game_title;
+ private string game_title;
private Savestate[] game_savestates;
private Savestate latest_savestate;
@@ -582,16 +582,15 @@ public class Games.RetroRunner : Object, Runner {
critical ("Unknown name for platform %s", platform_id);
platform_name = _("Unknown platform");
}
- var title = game_title.get_title ();
// See http://www.libpng.org/pub/png/spec/iso/index-object.html#11textinfo
// for description of used keys. "Game Title" and "Platform" are
// non-standard fields as allowed by PNG specification.
pixbuf.save (screenshot_path, "png",
"tEXt::Software", "GNOME Games",
- "tEXt::Title", @"Screenshot of $title on $platform_name",
+ "tEXt::Title", @"Screenshot of $game_title on $platform_name",
"tEXt::Creation Time", creation_time.to_string (),
- "tEXt::Game Title", title,
+ "tEXt::Game Title", game_title,
"tEXt::Platform", platform_name,
null);
}
diff --git a/src/retro/retro-simple-game-uri-adapter.vala b/src/retro/retro-simple-game-uri-adapter.vala
index 2d63db73..e8ee03cb 100644
--- a/src/retro/retro-simple-game-uri-adapter.vala
+++ b/src/retro/retro-simple-game-uri-adapter.vala
@@ -25,7 +25,7 @@ private class Games.RetroSimpleGameUriAdapter : GameUriAdapter, Object {
builder.core_source = core_source;
builder.uri = uri;
builder.uid = uid;
- builder.title = title;
+ builder.title = title.get_title ();
var runner = builder.to_runner ();
var game = new GenericGame (uid, title, platform, runner);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]