From 26583fd026b4a236de332827bbf4fd91ffb18dcf Mon Sep 17 00:00:00 2001 From: Jordan Woyak Date: Thu, 2 Apr 2026 17:55:29 -0500 Subject: [PATCH] HW/GBACore: Remove the GBA "Threads" setting. Make GBAs always run on dedicated threads in preparation for future improvements. --- .../features/settings/model/BooleanSetting.kt | 1 - .../settings/ui/SettingsFragmentPresenter.kt | 8 -------- Source/Android/app/src/main/res/values/strings.xml | 1 - Source/Core/Core/Config/MainSettings.cpp | 1 - Source/Core/Core/Config/MainSettings.h | 1 - Source/Core/Core/HW/GBACore.cpp | 13 +++---------- Source/Core/DolphinQt/Settings/GameCubePane.cpp | 6 ------ Source/Core/DolphinQt/Settings/GameCubePane.h | 1 - 8 files changed, 3 insertions(+), 29 deletions(-) diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/BooleanSetting.kt b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/BooleanSetting.kt index eab79765c6..b6a03e6b61 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/BooleanSetting.kt +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/BooleanSetting.kt @@ -145,7 +145,6 @@ enum class BooleanSetting( "EnablePlayTimeTracking", true ), - MAIN_GBA_THREADS(Settings.FILE_DOLPHIN, Settings.SECTION_INI_GBA, "Threads", true), MAIN_EXPAND_TO_CUTOUT_AREA( Settings.FILE_DOLPHIN, Settings.SECTION_INI_INTERFACE, diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragmentPresenter.kt b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragmentPresenter.kt index b11a0323a0..4603411c52 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragmentPresenter.kt +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragmentPresenter.kt @@ -704,14 +704,6 @@ class SettingsFragmentPresenter( ) sl.add(HeaderSetting(context, R.string.gba_settings, 0)) - sl.add( - SwitchSetting( - context, - BooleanSetting.MAIN_GBA_THREADS, - R.string.gba_threads, - 0, - ) - ) sl.add( FilePicker( context, diff --git a/Source/Android/app/src/main/res/values/strings.xml b/Source/Android/app/src/main/res/values/strings.xml index c1c9ec4b09..5c2e978d48 100644 --- a/Source/Android/app/src/main/res/values/strings.xml +++ b/Source/Android/app/src/main/res/values/strings.xml @@ -86,7 +86,6 @@ GameCube Slot B Device GameCube Serial Port 1 Device GBA Settings - Run GBA Cores in Dedicated Threads BIOS Game Boy Player ROM Saves diff --git a/Source/Core/Core/Config/MainSettings.cpp b/Source/Core/Core/Config/MainSettings.cpp index 2e1d41a151..ba54a3e9ec 100644 --- a/Source/Core/Core/Config/MainSettings.cpp +++ b/Source/Core/Core/Config/MainSettings.cpp @@ -407,7 +407,6 @@ const std::array, 5> MAIN_GBA_ROM_PATHS{ }; const Info MAIN_GBA_SAVES_PATH{{System::Main, "GBA", "SavesPath"}, ""}; const Info MAIN_GBA_SAVES_IN_ROM_PATH{{System::Main, "GBA", "SavesInRomPath"}, false}; -const Info MAIN_GBA_THREADS{{System::Main, "GBA", "Threads"}, true}; #endif // Main.Network diff --git a/Source/Core/Core/Config/MainSettings.h b/Source/Core/Core/Config/MainSettings.h index 45ca6e972b..1117df7255 100644 --- a/Source/Core/Core/Config/MainSettings.h +++ b/Source/Core/Core/Config/MainSettings.h @@ -227,7 +227,6 @@ extern const Info MAIN_GBA_BIOS_PATH; extern const std::array, 5> MAIN_GBA_ROM_PATHS; extern const Info MAIN_GBA_SAVES_PATH; extern const Info MAIN_GBA_SAVES_IN_ROM_PATH; -extern const Info MAIN_GBA_THREADS; static constexpr std::size_t GBPLAYER_GBA_INDEX = 4; #endif diff --git a/Source/Core/Core/HW/GBACore.cpp b/Source/Core/Core/HW/GBACore.cpp index dcb5c4675e..55a268c28a 100644 --- a/Source/Core/Core/HW/GBACore.cpp +++ b/Source/Core/Core/HW/GBACore.cpp @@ -264,12 +264,8 @@ bool Core::Start(u64 gc_ticks) // Notify the host and handle a dimension change if that happened after reset() SetVideoBuffer(); - if (Config::Get(Config::MAIN_GBA_THREADS)) - { - m_event_thread.Reset(fmt::format("GBA{}", m_device_number + 1), - std::bind_front(&Core::HandleEvent, this)); - } - + m_event_thread.Reset(fmt::format("GBA{}", m_device_number + 1), + std::bind_front(&Core::HandleEvent, this)); return true; } @@ -550,10 +546,7 @@ void Core::Flush() void Core::PushEvent(SyncEvent event) { - if (m_event_thread.IsRunning()) - m_event_thread.Push(event); - else - HandleEvent(event); + m_event_thread.Push(event); } void Core::HandleEvent(SyncEvent event) diff --git a/Source/Core/DolphinQt/Settings/GameCubePane.cpp b/Source/Core/DolphinQt/Settings/GameCubePane.cpp index 178a26d64b..e6d0db14b5 100644 --- a/Source/Core/DolphinQt/Settings/GameCubePane.cpp +++ b/Source/Core/DolphinQt/Settings/GameCubePane.cpp @@ -204,11 +204,6 @@ void GameCubePane::CreateWidgets() gba_box->setLayout(gba_layout); int gba_row = 0; - m_gba_threads = - new ConfigBool(tr("Run GBA Cores in Dedicated Threads"), Config::MAIN_GBA_THREADS); - gba_layout->addWidget(m_gba_threads, gba_row, 0, 1, -1); - gba_row++; - m_gba_bios_edit = new ConfigUserPath(F_GBABIOS_IDX, Config::MAIN_GBA_BIOS_PATH); m_gba_browse_bios = new NonDefaultQPushButton(QStringLiteral("...")); gba_layout->addWidget(new QLabel(tr("BIOS:")), gba_row, 0); @@ -307,7 +302,6 @@ void GameCubePane::OnEmulationStateChanged() { #ifdef HAS_LIBMGBA bool gba_enabled = !NetPlay::IsNetPlayRunning(); - m_gba_threads->setEnabled(gba_enabled); m_gba_bios_edit->setEnabled(gba_enabled); m_gba_browse_bios->setEnabled(gba_enabled); m_gba_save_rom_path->setEnabled(gba_enabled); diff --git a/Source/Core/DolphinQt/Settings/GameCubePane.h b/Source/Core/DolphinQt/Settings/GameCubePane.h index 3a339496a6..947ee7342c 100644 --- a/Source/Core/DolphinQt/Settings/GameCubePane.h +++ b/Source/Core/DolphinQt/Settings/GameCubePane.h @@ -81,7 +81,6 @@ private: Common::EnumMap m_gci_override_labels; Common::EnumMap m_gci_paths; - ConfigBool* m_gba_threads; ConfigBool* m_gba_save_rom_path; QPushButton* m_gba_browse_bios; ConfigUserPath* m_gba_bios_edit;