[gnome-games] game-boy-advance: Replace GameBoyAdvanceGame by GenericGame
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] game-boy-advance: Replace GameBoyAdvanceGame by GenericGame
- Date: Fri, 25 Mar 2016 06:45:18 +0000 (UTC)
commit 91fdcbc13360b8cfa2ec899fac20070fdb40eca3
Author: Adrien Plazas <kekun plazas laposte net>
Date: Wed Mar 23 09:08:38 2016 +0100
game-boy-advance: Replace GameBoyAdvanceGame by GenericGame
plugins/game-boy-advance/src/Makefile.am | 1 -
.../src/game-boy-advance-game.vala | 43 --------------------
.../src/game-boy-advance-plugin.vala | 9 ++++-
3 files changed, 8 insertions(+), 45 deletions(-)
---
diff --git a/plugins/game-boy-advance/src/Makefile.am b/plugins/game-boy-advance/src/Makefile.am
index 3f54289..84b442e 100644
--- a/plugins/game-boy-advance/src/Makefile.am
+++ b/plugins/game-boy-advance/src/Makefile.am
@@ -6,7 +6,6 @@ libgames_game_boy_advance_plugin_la_DEPENDENCIES = \
$(NULL)
libgames_game_boy_advance_plugin_la_SOURCES = \
- game-boy-advance-game.vala \
game-boy-advance-plugin.vala \
$(NULL)
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 adc8717..7a22396 100644
--- a/plugins/game-boy-advance/src/game-boy-advance-plugin.vala
+++ b/plugins/game-boy-advance/src/game-boy-advance-plugin.vala
@@ -1,7 +1,9 @@
// This file is part of GNOME Games. License: GPLv3
private class Games.GameBoyAdvancePlugin : Object, Plugin {
+ private const string FINGERPRINT_PREFIX = "game-boy-advance";
private const string MIME_TYPE = "application/x-gba-rom";
+ private const string MODULE_BASENAME = "libretro-game-boy-advance.so";
public GameSource get_game_source () throws Error {
var query = new MimeTypeTrackerQuery (MIME_TYPE, game_for_uri);
@@ -13,7 +15,12 @@ private class Games.GameBoyAdvancePlugin : Object, Plugin {
}
private static Game game_for_uri (string uri) throws Error {
- return new GameBoyAdvanceGame (uri);
+ var uid = new FingerprintUid (uri, FINGERPRINT_PREFIX);
+ var title = new FilenameTitle (uri);
+ var cover = new DummyCover ();
+ var runner = new RetroRunner (MODULE_BASENAME, uri, uid);
+
+ return new GenericGame (title, cover, runner);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]