[gnome-games] Take game title as argument when creating RetroRunner
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] Take game title as argument when creating RetroRunner
- Date: Mon, 20 Mar 2017 09:52:30 +0000 (UTC)
commit 03a0063e6ea582b9657c2445991bfe348b16c450
Author: Mateusz Sieczko <arvamer gmail com>
Date: Fri Mar 17 11:00:15 2017 +0100
Take game title as argument when creating RetroRunner
This will allow us to save title with screenshot's metadata.
https://bugzilla.gnome.org/show_bug.cgi?id=769833
plugins/amiga/src/amiga-plugin.vala | 2 +-
plugins/atari-2600/src/atari-2600-plugin.vala | 2 +-
plugins/atari-7800/src/atari-7800-plugin.vala | 2 +-
plugins/doom/src/doom-plugin.vala | 2 +-
plugins/dreamcast/src/dreamcast-plugin.vala | 2 +-
.../src/game-boy-advance-plugin.vala | 2 +-
plugins/game-boy/src/game-boy-plugin.vala | 2 +-
plugins/game-cube/src/game-cube-plugin.vala | 2 +-
plugins/libretro/src/libretro-game-source.vala | 2 +-
plugins/mame/src/mame-game-uri-adapter.vala | 2 +-
.../master-system/src/master-system-plugin.vala | 4 ++--
plugins/mega-drive/src/mega-drive-plugin.vala | 4 ++--
.../neo-geo-pocket/src/neo-geo-pocket-plugin.vala | 2 +-
plugins/nes/src/nes-plugin.vala | 4 ++--
plugins/nintendo-64/src/nintendo-64-plugin.vala | 2 +-
plugins/nintendo-ds/src/nintendo-ds-plugin.vala | 2 +-
plugins/pc-engine/src/pc-engine-plugin.vala | 4 ++--
.../playstation/src/playstation-game-factory.vala | 2 +-
plugins/sega-saturn/src/sega-saturn-plugin.vala | 2 +-
plugins/snes/src/snes-plugin.vala | 2 +-
plugins/wii-ware/src/wii-ware-plugin.vala | 2 +-
plugins/wii/src/wii-plugin.vala | 2 +-
src/retro/retro-runner.vala | 10 +++++++---
23 files changed, 33 insertions(+), 29 deletions(-)
---
diff --git a/plugins/amiga/src/amiga-plugin.vala b/plugins/amiga/src/amiga-plugin.vala
index 03a54eb..53863be 100644
--- a/plugins/amiga/src/amiga-plugin.vala
+++ b/plugins/amiga/src/amiga-plugin.vala
@@ -25,7 +25,7 @@ private class Games.AmigaPlugin : 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);
+ var runner = new RetroRunner (core_source, uri, uid, title);
return new GenericGame (title, icon, cover, runner);
}
diff --git a/plugins/atari-2600/src/atari-2600-plugin.vala b/plugins/atari-2600/src/atari-2600-plugin.vala
index 027fa57..5842066 100644
--- a/plugins/atari-2600/src/atari-2600-plugin.vala
+++ b/plugins/atari-2600/src/atari-2600-plugin.vala
@@ -25,7 +25,7 @@ private class Games.Atari2600 : 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);
+ var runner = new RetroRunner (core_source, uri, uid, title);
return new GenericGame (title, icon, cover, runner);
}
diff --git a/plugins/atari-7800/src/atari-7800-plugin.vala b/plugins/atari-7800/src/atari-7800-plugin.vala
index 3a07c41..3ee4232 100644
--- a/plugins/atari-7800/src/atari-7800-plugin.vala
+++ b/plugins/atari-7800/src/atari-7800-plugin.vala
@@ -25,7 +25,7 @@ private class Games.Atari7800 : 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);
+ var runner = new RetroRunner (core_source, uri, uid, title);
return new GenericGame (title, icon, cover, runner);
}
diff --git a/plugins/doom/src/doom-plugin.vala b/plugins/doom/src/doom-plugin.vala
index 7dd7c33..30f1c7a 100644
--- a/plugins/doom/src/doom-plugin.vala
+++ b/plugins/doom/src/doom-plugin.vala
@@ -22,7 +22,7 @@ private class Games.DoomPlugin : Object, Plugin {
var icon = new DummyIcon ();
var cover = new LocalCover (uri);
var core_source = new RetroCoreSource (PLATFORM, { MIME_TYPE });
- var runner = new RetroRunner (core_source, uri, uid);
+ var runner = new RetroRunner (core_source, uri, uid, title);
return new GenericGame (title, icon, cover, runner);
}
diff --git a/plugins/dreamcast/src/dreamcast-plugin.vala b/plugins/dreamcast/src/dreamcast-plugin.vala
index eae8e5d..9f8109f 100644
--- a/plugins/dreamcast/src/dreamcast-plugin.vala
+++ b/plugins/dreamcast/src/dreamcast-plugin.vala
@@ -28,7 +28,7 @@ private class Games.DreamcastPlugin : 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);
+ var runner = new RetroRunner (core_source, uri, uid, title);
return new GenericGame (title, icon, cover, runner);
}
diff --git a/plugins/game-boy-advance/src/game-boy-advance-plugin.vala
b/plugins/game-boy-advance/src/game-boy-advance-plugin.vala
index 9b2e8c2..1716431 100644
--- a/plugins/game-boy-advance/src/game-boy-advance-plugin.vala
+++ b/plugins/game-boy-advance/src/game-boy-advance-plugin.vala
@@ -25,7 +25,7 @@ private class Games.GameBoyAdvancePlugin : 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);
+ var runner = new RetroRunner (core_source, uri, uid, title);
return new GenericGame (title, icon, cover, runner);
}
diff --git a/plugins/game-boy/src/game-boy-plugin.vala b/plugins/game-boy/src/game-boy-plugin.vala
index 0e23dcb..e5d4cab 100644
--- a/plugins/game-boy/src/game-boy-plugin.vala
+++ b/plugins/game-boy/src/game-boy-plugin.vala
@@ -52,7 +52,7 @@ private class Games.GameBoyPlugin : 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);
+ var runner = new RetroRunner (core_source, uri, uid, title);
return new GenericGame (title, icon, cover, runner);
}
diff --git a/plugins/game-cube/src/game-cube-plugin.vala b/plugins/game-cube/src/game-cube-plugin.vala
index c5b67ff..29e7ab5 100644
--- a/plugins/game-cube/src/game-cube-plugin.vala
+++ b/plugins/game-cube/src/game-cube-plugin.vala
@@ -28,7 +28,7 @@ private class Games.GameCubePlugin : 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);
+ var runner = new RetroRunner (core_source, uri, uid, title);
return new GenericGame (title, icon, cover, runner);
}
diff --git a/plugins/libretro/src/libretro-game-source.vala b/plugins/libretro/src/libretro-game-source.vala
index fb2725f..6e39f12 100644
--- a/plugins/libretro/src/libretro-game-source.vala
+++ b/plugins/libretro/src/libretro-game-source.vala
@@ -37,7 +37,7 @@ public class Games.LibretroGameSource : Object, GameSource {
var title = new LibretroTitle (core_descriptor);
var icon = new LibretroIcon (core_descriptor);
var cover = new DummyCover ();
- var runner = new RetroRunner.for_core_descriptor (core_descriptor, uid);
+ var runner = new RetroRunner.for_core_descriptor (core_descriptor, uid, title);
return new GenericGame (title, icon, cover, runner);
}
diff --git a/plugins/mame/src/mame-game-uri-adapter.vala b/plugins/mame/src/mame-game-uri-adapter.vala
index e79c167..32c8193 100644
--- a/plugins/mame/src/mame-game-uri-adapter.vala
+++ b/plugins/mame/src/mame-game-uri-adapter.vala
@@ -27,7 +27,7 @@ private class Games.MameGameUriAdapter : GameUriAdapter, Object {
var icon = new DummyIcon ();
var cover = new LocalCover (uri);
var core_source = new RetroCoreSource (PLATFORM, { SEARCHED_MIME_TYPE, SPECIFIC_MIME_TYPE });
- var runner = new RetroRunner (core_source, uri, uid);
+ var runner = new RetroRunner (core_source, uri, uid, title);
return new GenericGame (title, icon, cover, runner);
}
diff --git a/plugins/master-system/src/master-system-plugin.vala
b/plugins/master-system/src/master-system-plugin.vala
index 2057b17..70470f9 100644
--- a/plugins/master-system/src/master-system-plugin.vala
+++ b/plugins/master-system/src/master-system-plugin.vala
@@ -62,7 +62,7 @@ private class Games.MasterSystemPlugin : 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);
+ var runner = new RetroRunner (core_source, uri, uid, title);
return new GenericGame (title, icon, cover, runner);
}
@@ -76,7 +76,7 @@ private class Games.MasterSystemPlugin : Object, Plugin {
new LocalCover (uri),
new GriloCover (media, uid)});
var core_source = new RetroCoreSource (SG_1000_PLATFORM, { SG_1000_MIME_TYPE });
- var runner = new RetroRunner (core_source, uri, uid);
+ var runner = new RetroRunner (core_source, uri, uid, title);
return new GenericGame (title, icon, cover, runner);
}
diff --git a/plugins/mega-drive/src/mega-drive-plugin.vala b/plugins/mega-drive/src/mega-drive-plugin.vala
index cae3bc6..0c6726e 100644
--- a/plugins/mega-drive/src/mega-drive-plugin.vala
+++ b/plugins/mega-drive/src/mega-drive-plugin.vala
@@ -73,7 +73,7 @@ private class Games.MegaDrivePlugin : 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);
+ var runner = new RetroRunner (core_source, uri, uid, title);
return new GenericGame (title, icon, cover, runner);
}
@@ -109,7 +109,7 @@ private class Games.MegaDrivePlugin : Object, Plugin {
new LocalCover (uri),
new GriloCover (media, uid)});
var core_source = new RetroCoreSource (platform, mime_types);
- var runner = new RetroRunner (core_source, uri, uid);
+ var runner = new RetroRunner (core_source, uri, uid, title);
return new GenericGame (title, icon, cover, runner);
}
diff --git a/plugins/neo-geo-pocket/src/neo-geo-pocket-plugin.vala
b/plugins/neo-geo-pocket/src/neo-geo-pocket-plugin.vala
index 94fa9d6..684d557 100644
--- a/plugins/neo-geo-pocket/src/neo-geo-pocket-plugin.vala
+++ b/plugins/neo-geo-pocket/src/neo-geo-pocket-plugin.vala
@@ -25,7 +25,7 @@ private class Games.NeoGeoPocketPlugin : 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);
+ var runner = new RetroRunner (core_source, uri, uid, title);
return new GenericGame (title, icon, cover, runner);
}
diff --git a/plugins/nes/src/nes-plugin.vala b/plugins/nes/src/nes-plugin.vala
index 5d3af42..228c806 100644
--- a/plugins/nes/src/nes-plugin.vala
+++ b/plugins/nes/src/nes-plugin.vala
@@ -36,7 +36,7 @@ private class Games.NesPlugin : Object, Plugin {
new LocalCover (uri),
new GriloCover (media, uid)});
var core_source = new RetroCoreSource (NES_PLATFORM, { NES_MIME_TYPE });
- var runner = new RetroRunner (core_source, uri, uid);
+ var runner = new RetroRunner (core_source, uri, uid, title);
return new GenericGame (title, icon, cover, runner);
}
@@ -50,7 +50,7 @@ private class Games.NesPlugin : Object, Plugin {
new LocalCover (uri),
new GriloCover (media, uid)});
var core_source = new RetroCoreSource (FDS_PLATFORM, { FDS_MIME_TYPE });
- var runner = new RetroRunner (core_source, uri, uid);
+ var runner = new RetroRunner (core_source, uri, uid, title);
return new GenericGame (title, icon, cover, runner);
}
diff --git a/plugins/nintendo-64/src/nintendo-64-plugin.vala b/plugins/nintendo-64/src/nintendo-64-plugin.vala
index a92014a..1b6f127 100644
--- a/plugins/nintendo-64/src/nintendo-64-plugin.vala
+++ b/plugins/nintendo-64/src/nintendo-64-plugin.vala
@@ -25,7 +25,7 @@ private class Games.Nintendo64Plugin : 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);
+ var runner = new RetroRunner (core_source, uri, uid, title);
return new GenericGame (title, icon, cover, runner);
}
diff --git a/plugins/nintendo-ds/src/nintendo-ds-plugin.vala b/plugins/nintendo-ds/src/nintendo-ds-plugin.vala
index 9c6214a..f6d6c10 100644
--- a/plugins/nintendo-ds/src/nintendo-ds-plugin.vala
+++ b/plugins/nintendo-ds/src/nintendo-ds-plugin.vala
@@ -25,7 +25,7 @@ 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);
+ var runner = new RetroRunner (core_source, uri, uid, title);
return new GenericGame (title, icon, cover, runner);
}
diff --git a/plugins/pc-engine/src/pc-engine-plugin.vala b/plugins/pc-engine/src/pc-engine-plugin.vala
index 29b4fbc..e1115f6 100644
--- a/plugins/pc-engine/src/pc-engine-plugin.vala
+++ b/plugins/pc-engine/src/pc-engine-plugin.vala
@@ -34,7 +34,7 @@ private class Games.PcEnginePlugin : 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);
+ var runner = new RetroRunner (core_source, uri, uid, title);
return new GenericGame (title, icon, cover, runner);
}
@@ -51,7 +51,7 @@ private class Games.PcEnginePlugin : Object, Plugin {
new LocalCover (uri),
new GriloCover (media, uid)});
var core_source = new RetroCoreSource (CD_PLATFORM, { CUE_MIME_TYPE, MIME_TYPE });
- var runner = new RetroRunner (core_source, uri, uid);
+ var runner = new RetroRunner (core_source, uri, uid, title);
return new GenericGame (title, icon, cover, runner);
}
diff --git a/plugins/playstation/src/playstation-game-factory.vala
b/plugins/playstation/src/playstation-game-factory.vala
index 89f8e94..20cc2db 100644
--- a/plugins/playstation/src/playstation-game-factory.vala
+++ b/plugins/playstation/src/playstation-game-factory.vala
@@ -155,7 +155,7 @@ public class Games.PlayStationGameFactory : Object, UriGameFactory {
new GriloCover (media, uid)});
var input_capabilities = new GameinfoDiscIdInputCapabilities (gameinfo, header.disc_id);
var core_source = new RetroCoreSource (PLATFORM, { SEARCHED_MIME_TYPE, SPECIFIC_MIME_TYPE });
- var runner = new RetroRunner.for_media_set_and_input_capabilities (core_source, media_set,
uid, input_capabilities);
+ var runner = new RetroRunner.for_media_set_and_input_capabilities (core_source, media_set,
uid, input_capabilities, title);
return new GenericGame (title, icon, cover, runner);
}
diff --git a/plugins/sega-saturn/src/sega-saturn-plugin.vala b/plugins/sega-saturn/src/sega-saturn-plugin.vala
index c86843c..c78d9eb 100644
--- a/plugins/sega-saturn/src/sega-saturn-plugin.vala
+++ b/plugins/sega-saturn/src/sega-saturn-plugin.vala
@@ -32,7 +32,7 @@ private class Games.SegaSaturnPlugin : Object, Plugin {
new LocalCover (uri),
new GriloCover (media, uid)});
var core_source = new RetroCoreSource (PLATFORM, { SEARCHED_MIME_TYPE, SPECIFIC_MIME_TYPE });
- var runner = new RetroRunner (core_source, uri, uid);
+ var runner = new RetroRunner (core_source, uri, uid, title);
return new GenericGame (title, icon, cover, runner);
}
diff --git a/plugins/snes/src/snes-plugin.vala b/plugins/snes/src/snes-plugin.vala
index 60a6d92..fbc0484 100644
--- a/plugins/snes/src/snes-plugin.vala
+++ b/plugins/snes/src/snes-plugin.vala
@@ -25,7 +25,7 @@ private class Games.SnesPlugin : 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);
+ var runner = new RetroRunner (core_source, uri, uid, title);
return new GenericGame (title, icon, cover, runner);
}
diff --git a/plugins/wii-ware/src/wii-ware-plugin.vala b/plugins/wii-ware/src/wii-ware-plugin.vala
index 389577a..aedcc36 100644
--- a/plugins/wii-ware/src/wii-ware-plugin.vala
+++ b/plugins/wii-ware/src/wii-ware-plugin.vala
@@ -25,7 +25,7 @@ private class Games.WiiWarePlugin : 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);
+ var runner = new RetroRunner (core_source, uri, uid, title);
return new GenericGame (title, icon, cover, runner);
}
diff --git a/plugins/wii/src/wii-plugin.vala b/plugins/wii/src/wii-plugin.vala
index 47f2d2c..589ab0f 100644
--- a/plugins/wii/src/wii-plugin.vala
+++ b/plugins/wii/src/wii-plugin.vala
@@ -28,7 +28,7 @@ private class Games.WiiPlugin : 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);
+ var runner = new RetroRunner (core_source, uri, uid, title);
return new GenericGame (title, icon, cover, runner);
}
diff --git a/src/retro/retro-runner.vala b/src/retro/retro-runner.vala
index 55f5f96..8e7b1c6 100644
--- a/src/retro/retro-runner.vala
+++ b/src/retro/retro-runner.vala
@@ -51,6 +51,7 @@ public class Games.RetroRunner : Object, Runner {
private Uid uid;
private InputCapabilities input_capabilities;
private Settings settings;
+ private Title game_title;
private bool _running;
private bool running {
@@ -69,7 +70,7 @@ public class Games.RetroRunner : Object, Runner {
private bool is_ready;
private bool should_save;
- public RetroRunner (RetroCoreSource core_source, string uri, Uid uid) {
+ public RetroRunner (RetroCoreSource core_source, string uri, Uid uid, Title game_title) {
is_initialized = false;
is_ready = false;
should_save = false;
@@ -81,9 +82,10 @@ public class Games.RetroRunner : Object, Runner {
this.uid = uid;
this.core_source = core_source;
this.input_capabilities = null;
+ this.game_title = game_title;
}
- public RetroRunner.for_media_set_and_input_capabilities (RetroCoreSource core_source, MediaSet
media_set, Uid uid, InputCapabilities input_capabilities) {
+ public RetroRunner.for_media_set_and_input_capabilities (RetroCoreSource core_source, MediaSet
media_set, Uid uid, InputCapabilities input_capabilities, Title game_title) {
is_initialized = false;
is_ready = false;
should_save = false;
@@ -93,11 +95,12 @@ public class Games.RetroRunner : Object, Runner {
this._media_set = media_set;
this.uid = uid;
this.input_capabilities = input_capabilities;
+ this.game_title = game_title;
_media_set.notify["selected-media-number"].connect (on_media_number_changed);
}
- public RetroRunner.for_core_descriptor (Retro.CoreDescriptor core_descriptor, Uid uid) {
+ public RetroRunner.for_core_descriptor (Retro.CoreDescriptor core_descriptor, Uid uid, Title
game_title) {
is_initialized = false;
is_ready = false;
should_save = false;
@@ -107,6 +110,7 @@ public class Games.RetroRunner : Object, Runner {
this._media_set = new MediaSet ({});
this.uid = uid;
this.input_capabilities = null;
+ this.game_title = game_title;
}
construct {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]