From 651d9fa495e44955ccc89d7cee7f557d62237f81 Mon Sep 17 00:00:00 2001 From: ITotalJustice <47043333+ITotalJustice@users.noreply.github.com> Date: Sat, 19 Apr 2025 22:55:08 +0100 Subject: [PATCH] remove theme shuffle option fixes #121 --- sphaira/include/app.hpp | 3 --- sphaira/source/app.cpp | 14 +------------- sphaira/source/ui/menus/main_menu.cpp | 4 ---- 3 files changed, 1 insertion(+), 20 deletions(-) diff --git a/sphaira/include/app.hpp b/sphaira/include/app.hpp index 8e014bd..584290a 100644 --- a/sphaira/include/app.hpp +++ b/sphaira/include/app.hpp @@ -77,7 +77,6 @@ public: static auto GetInstallEnable() -> bool; static auto GetInstallSdEnable() -> bool; static auto GetInstallPrompt() -> bool; - static auto GetThemeShuffleEnable() -> bool; static auto GetThemeMusicEnable() -> bool; static auto Get12HourTimeEnable() -> bool; static auto GetLanguage() -> long; @@ -91,7 +90,6 @@ public: static void SetInstallEnable(bool enable); static void SetInstallSdEnable(bool enable); static void SetInstallPrompt(bool enable); - static void SetThemeShuffleEnable(bool enable); static void SetThemeMusicEnable(bool enable); static void Set12HourTimeEnable(bool enable); static void SetLanguage(long index); @@ -177,7 +175,6 @@ public: option::OptionBool m_install{INI_SECTION, "install", false}; option::OptionBool m_install_sd{INI_SECTION, "install_sd", true}; option::OptionLong m_install_prompt{INI_SECTION, "install_prompt", true}; - option::OptionBool m_theme_shuffle{INI_SECTION, "theme_shuffle", false}; option::OptionBool m_theme_music{INI_SECTION, "theme_music", true}; option::OptionBool m_12hour_time{INI_SECTION, "12hour_time", false}; option::OptionLong m_language{INI_SECTION, "language", 0}; // auto diff --git a/sphaira/source/app.cpp b/sphaira/source/app.cpp index ef2f314..191af6e 100644 --- a/sphaira/source/app.cpp +++ b/sphaira/source/app.cpp @@ -580,10 +580,6 @@ auto App::GetInstallPrompt() -> bool { return g_app->m_install_prompt.Get(); } -auto App::GetThemeShuffleEnable() -> bool { - return g_app->m_theme_shuffle.Get(); -} - auto App::GetThemeMusicEnable() -> bool { return g_app->m_theme_music.Get(); } @@ -741,10 +737,6 @@ void App::SetInstallPrompt(bool enable) { g_app->m_install_prompt.Set(enable); } -void App::SetThemeShuffleEnable(bool enable) { - g_app->m_theme_shuffle.Set(enable); -} - void App::SetThemeMusicEnable(bool enable) { g_app->m_theme_music.Set(enable); PlaySoundEffect(SoundEffect::SoundEffect_Music); @@ -1323,11 +1315,7 @@ App::App(const char* argv0) { fs::FsPath theme_path{}; constexpr fs::FsPath default_theme_path{"romfs:/themes/abyss_theme.ini"}; - if (App::GetThemeShuffleEnable() && m_theme_meta_entries.size()) { - theme_path = m_theme_meta_entries[randomGet64() % m_theme_meta_entries.size()].ini_path; - } else { - ini_gets("config", "theme", default_theme_path, theme_path, sizeof(theme_path), CONFIG_PATH); - } + ini_gets("config", "theme", default_theme_path, theme_path, sizeof(theme_path), CONFIG_PATH); // try and load previous theme, default to previous version otherwise. ThemeMeta theme_meta; diff --git a/sphaira/source/ui/menus/main_menu.cpp b/sphaira/source/ui/menus/main_menu.cpp index 42914f3..0043e9e 100644 --- a/sphaira/source/ui/menus/main_menu.cpp +++ b/sphaira/source/ui/menus/main_menu.cpp @@ -246,10 +246,6 @@ MainMenu::MainMenu() { App::SetTheme(index_out); }, App::GetThemeIndex())); - options->Add(std::make_shared("Shuffle"_i18n, App::GetThemeShuffleEnable(), [this](bool& enable){ - App::SetThemeShuffleEnable(enable); - }, "Enabled"_i18n, "Disabled"_i18n)); - options->Add(std::make_shared("Music"_i18n, App::GetThemeMusicEnable(), [this](bool& enable){ App::SetThemeMusicEnable(enable); }, "Enabled"_i18n, "Disabled"_i18n));