[gnome-games/wip/exalm/platform-preferences: 21/26] static
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/wip/exalm/platform-preferences: 21/26] static
- Date: Thu, 27 Sep 2018 16:35:20 +0000 (UTC)
commit a1a96fd855437ac250962e72371883fe50264c9d
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date: Wed Sep 26 23:15:34 2018 +0500
static
src/ui/preferences-page-retro-platform.vala | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/src/ui/preferences-page-retro-platform.vala b/src/ui/preferences-page-retro-platform.vala
index 192e00e9..7ae2299e 100644
--- a/src/ui/preferences-page-retro-platform.vala
+++ b/src/ui/preferences-page-retro-platform.vala
@@ -18,6 +18,15 @@ private class Games.PreferencesPageRetroPlatform: Gtk.Bin, PreferencesPage {
[GtkChild]
private Gtk.ListBox core_list_box;
+ private static Retro.CoreDescriptor[] core_descriptors;
+
+ static construct {
+ var query = new Retro.ModuleQuery (true);
+ core_descriptors = {};
+ foreach (var core_descriptor in query)
+ core_descriptors += core_descriptor;
+ }
+
public PreferencesPageRetroPlatform (RetroPlatform platform) {
this.platform = platform;
_title = platform.get_name ();
@@ -26,8 +35,7 @@ private class Games.PreferencesPageRetroPlatform: Gtk.Bin, PreferencesPage {
}
private void build_core_list () {
- var modules = new Retro.ModuleQuery (true);
- foreach (var core_descriptor in modules) {
+ foreach (var core_descriptor in core_descriptors) {
try {
var platform_id = platform.get_id ();
var mime_types = platform.get_mime_types ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]