[gnome-games/wip/exalm/psx-cleanup: 1/10] playstation: Don't set custom input capabilities
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/wip/exalm/psx-cleanup: 1/10] playstation: Don't set custom input capabilities
- Date: Mon, 10 Feb 2020 11:55:01 +0000 (UTC)
commit 1c6bc9a6e5d043831ac8ce3c33a5f2b906713ecf
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Mon Feb 10 15:41:33 2020 +0500
playstation: Don't set custom input capabilities
Since dualshock is now set via an option, we don't need this anymore.
plugins/playstation/src/playstation-game-factory.vala | 3 +--
.../playstation/src/playstation-gameinfo-cache.vala | 19 +++++--------------
plugins/playstation/src/playstation-plugin.vala | 2 --
3 files changed, 6 insertions(+), 18 deletions(-)
---
diff --git a/plugins/playstation/src/playstation-game-factory.vala
b/plugins/playstation/src/playstation-game-factory.vala
index f12a95bf..6e82831b 100644
--- a/plugins/playstation/src/playstation-game-factory.vala
+++ b/plugins/playstation/src/playstation-game-factory.vala
@@ -127,8 +127,7 @@ public class Games.PlayStationGameFactory : Object, UriGameFactory {
if (game_added_callback != null)
game_added_callback (game);
- var input_capabilities = new GameinfoDiscIdInputCapabilities (gameinfo, disc_set_id);
- gameinfo_cache.store_info (uri, media_set, input_capabilities);
+ gameinfo_cache.store_info (uri, media_set);
}
public void foreach_game (GameCallback game_callback) {
diff --git a/plugins/playstation/src/playstation-gameinfo-cache.vala
b/plugins/playstation/src/playstation-gameinfo-cache.vala
index 8446de09..5cf5e014 100644
--- a/plugins/playstation/src/playstation-gameinfo-cache.vala
+++ b/plugins/playstation/src/playstation-gameinfo-cache.vala
@@ -1,26 +1,17 @@
// This file is part of GNOME Games. License: GPL-3.0+.
public class Games.PlaystationGameinfoCache : Object {
- private struct InfoCache {
- MediaSet media_set;
- InputCapabilities input_capabilities;
- }
-
- private HashTable<Uri, InfoCache?> info_for_uri;
+ private HashTable<Uri, MediaSet> info_for_uri;
construct {
- info_for_uri = new HashTable<Uri, InfoCache?> (Uri.hash, Uri.equal);
+ info_for_uri = new HashTable<Uri, MediaSet> (Uri.hash, Uri.equal);
}
- public void store_info (Uri uri, MediaSet media_set, InputCapabilities input_capabilities) {
- info_for_uri[uri] = { media_set, input_capabilities };
+ public void store_info (Uri uri, MediaSet media_set) {
+ info_for_uri[uri] = media_set;
}
public MediaSet get_media_set (Uri uri) {
- return info_for_uri[uri].media_set;
- }
-
- public InputCapabilities get_input_capabilities (Uri uri) {
- return info_for_uri[uri].input_capabilities;
+ return info_for_uri[uri];
}
}
diff --git a/plugins/playstation/src/playstation-plugin.vala b/plugins/playstation/src/playstation-plugin.vala
index d021baf7..ebd34a4e 100644
--- a/plugins/playstation/src/playstation-plugin.vala
+++ b/plugins/playstation/src/playstation-plugin.vala
@@ -41,7 +41,6 @@ private class Games.PlayStation : Object, Plugin {
public static Runner? create_runner (Game game) throws Error {
var uri = game.get_uri ();
var media_set = gameinfo_cache.get_media_set (uri);
- var input_capabilities = gameinfo_cache.get_input_capabilities (uri);
var core_source = new RetroCoreSource (platform);
@@ -50,7 +49,6 @@ private class Games.PlayStation : Object, Plugin {
builder.media_set = media_set;
builder.uid = game.get_uid ();
builder.title = game.name;
- builder.input_capabilities = input_capabilities;
return builder.to_runner ();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]