From defbbfd13f019667d4d4a779483a9e1702272316 Mon Sep 17 00:00:00 2001
From: Leon Styhre <leon@leonstyhre.com>
Date: Wed, 20 Apr 2022 22:39:27 +0200
Subject: [PATCH] Removed the setting 'Preload gamelists on startup'.

---
 es-app/src/guis/GuiMenu.cpp         | 11 -----------
 es-app/src/views/ViewController.cpp |  6 +-----
 es-core/src/Settings.cpp            |  1 -
 3 files changed, 1 insertion(+), 17 deletions(-)

diff --git a/es-app/src/guis/GuiMenu.cpp b/es-app/src/guis/GuiMenu.cpp
index e526957c3..ac54aada6 100644
--- a/es-app/src/guis/GuiMenu.cpp
+++ b/es-app/src/guis/GuiMenu.cpp
@@ -1161,17 +1161,6 @@ void GuiMenu::openOtherOptions()
         }
     });
 
-    // Whether to preload the gamelists on application startup.
-    auto preloadGamelists = std::make_shared<SwitchComponent>();
-    preloadGamelists->setState(Settings::getInstance()->getBool("PreloadGamelists"));
-    s->addWithLabel("PRELOAD GAMELISTS ON STARTUP", preloadGamelists);
-    s->addSaveFunc([preloadGamelists, s] {
-        if (preloadGamelists->getState() != Settings::getInstance()->getBool("PreloadGamelists")) {
-            Settings::getInstance()->setBool("PreloadGamelists", preloadGamelists->getState());
-            s->setNeedsSaving();
-        }
-    });
-
     // Whether to enable alternative emulators per game (the option to disable this is intended
     // primarily for testing purposes).
     auto alternativeEmulatorPerGame = std::make_shared<SwitchComponent>();
diff --git a/es-app/src/views/ViewController.cpp b/es-app/src/views/ViewController.cpp
index afcb58979..675f5850a 100644
--- a/es-app/src/views/ViewController.cpp
+++ b/es-app/src/views/ViewController.cpp
@@ -945,11 +945,7 @@ void ViewController::preload()
                 std::to_string(systemCount) + ")");
         }
         (*it)->getIndex()->resetFilters();
-
-        if (Settings::getInstance()->getBool("PreloadGamelists"))
-            getGamelistView(*it)->preloadGamelist();
-        else
-            getGamelistView(*it);
+        getGamelistView(*it)->preloadGamelist();
     }
 
     // Load navigation sounds, either from the theme if it supports it, or otherwise from
diff --git a/es-core/src/Settings.cpp b/es-core/src/Settings.cpp
index 08828f9f0..fd0ac0a8e 100644
--- a/es-core/src/Settings.cpp
+++ b/es-core/src/Settings.cpp
@@ -233,7 +233,6 @@ void Settings::setDefaults()
     mBoolMap["VideoHardwareDecoding"] = {false, false};
 #endif
     mBoolMap["VideoUpscaleFrameRate"] = {false, false};
-    mBoolMap["PreloadGamelists"] = {true, true};
     mBoolMap["AlternativeEmulatorPerGame"] = {true, true};
     mBoolMap["ShowHiddenFiles"] = {true, true};
     mBoolMap["ShowHiddenGames"] = {true, true};