From d0de0a3f478a8a491c5b7dad8369dc0961110925 Mon Sep 17 00:00:00 2001 From: Dentomologist Date: Sat, 2 Aug 2025 14:26:15 -0700 Subject: [PATCH 1/3] Host: Remove unnecessary function Remove Host_UpdateMainFrame(). The only non-empty call happened in DolphinNoGUI which called s_update_main_frame_event.Set(), but DolphinNoGUI never waits on that event. --- Source/Android/jni/MainAndroid.cpp | 4 ---- Source/Core/Core/Core.cpp | 3 --- Source/Core/Core/FifoPlayer/FifoPlayer.cpp | 1 - Source/Core/Core/Host.h | 1 - Source/Core/Core/State.cpp | 2 -- Source/Core/DolphinNoGUI/MainNoGUI.cpp | 6 ------ Source/Core/DolphinQt/Host.cpp | 3 --- Source/Core/DolphinTool/ToolHeadlessPlatform.cpp | 4 ---- Source/DSPTool/StubHost.cpp | 3 --- Source/UnitTests/StubHost.cpp | 3 --- 10 files changed, 30 deletions(-) diff --git a/Source/Android/jni/MainAndroid.cpp b/Source/Android/jni/MainAndroid.cpp index 7f4daf54dd..0380ade0b8 100644 --- a/Source/Android/jni/MainAndroid.cpp +++ b/Source/Android/jni/MainAndroid.cpp @@ -163,10 +163,6 @@ void Host_JitProfileDataWiped() { } -void Host_UpdateMainFrame() -{ -} - void Host_RequestRenderWindowSize(int width, int height) { std::thread jnicall(UpdatePointer); diff --git a/Source/Core/Core/Core.cpp b/Source/Core/Core/Core.cpp index ccb1ad68bd..3292abbff9 100644 --- a/Source/Core/Core/Core.cpp +++ b/Source/Core/Core/Core.cpp @@ -242,8 +242,6 @@ bool Init(Core::System& system, std::unique_ptr boot, const Wind INFO_LOG_FMT(BOOT, "Starting core = {} mode", system.IsWii() ? "Wii" : "GameCube"); INFO_LOG_FMT(BOOT, "CPU Thread separate = {}", system.IsDualCoreMode() ? "Yes" : "No"); - Host_UpdateMainFrame(); // Disable any menus or buttons at boot - // Manually reactivate the video backend in case a GameINI overrides the video backend setting. VideoBackendBase::PopulateBackendInfo(wsi); @@ -342,7 +340,6 @@ static void CPUSetInitialExecutionState(bool force_paused = false) bool paused = SConfig::GetInstance().bBootToPause || force_paused; SetState(system, paused ? State::Paused : State::Running, true, true); Host_UpdateDisasmDialog(); - Host_UpdateMainFrame(); Host_Message(HostMessageID::WMUserCreate); }); } diff --git a/Source/Core/Core/FifoPlayer/FifoPlayer.cpp b/Source/Core/Core/FifoPlayer/FifoPlayer.cpp index bb1ae839f5..4fe908dc8b 100644 --- a/Source/Core/Core/FifoPlayer/FifoPlayer.cpp +++ b/Source/Core/Core/FifoPlayer/FifoPlayer.cpp @@ -262,7 +262,6 @@ public: case CPU::State::Stepping: cpu.Break(); - Host_UpdateMainFrame(); break; case CPU::State::Running: diff --git a/Source/Core/Core/Host.h b/Source/Core/Core/Host.h index 5fc1fc1ee9..8ddbbbaefb 100644 --- a/Source/Core/Core/Host.h +++ b/Source/Core/Core/Host.h @@ -63,7 +63,6 @@ void Host_RequestRenderWindowSize(int width, int height); void Host_UpdateDisasmDialog(); void Host_JitCacheInvalidation(); void Host_JitProfileDataWiped(); -void Host_UpdateMainFrame(); void Host_UpdateTitle(const std::string& title); void Host_YieldToUI(); void Host_TitleChanged(); diff --git a/Source/Core/Core/State.cpp b/Source/Core/Core/State.cpp index a947ad19a3..ffd811bd6c 100644 --- a/Source/Core/Core/State.cpp +++ b/Source/Core/Core/State.cpp @@ -456,8 +456,6 @@ static void CompressAndDumpState(Core::System& system, CompressAndDumpState_args Core::DisplayMessage(fmt::format("Saved State to {}", temp_path.filename().string()), 2000); } } - - Host_UpdateMainFrame(); } void SaveAs(Core::System& system, const std::string& filename, bool wait) diff --git a/Source/Core/DolphinNoGUI/MainNoGUI.cpp b/Source/Core/DolphinNoGUI/MainNoGUI.cpp index 81051adb78..a09a2060fd 100644 --- a/Source/Core/DolphinNoGUI/MainNoGUI.cpp +++ b/Source/Core/DolphinNoGUI/MainNoGUI.cpp @@ -70,7 +70,6 @@ bool Host_UIBlocksControllerState() return false; } -static Common::Event s_update_main_frame_event; void Host_Message(const HostMessageID id) { if (id == HostMessageID::WMUserStop) @@ -94,11 +93,6 @@ void Host_JitProfileDataWiped() { } -void Host_UpdateMainFrame() -{ - s_update_main_frame_event.Set(); -} - void Host_RequestRenderWindowSize(int width, int height) { } diff --git a/Source/Core/DolphinQt/Host.cpp b/Source/Core/DolphinQt/Host.cpp index d7d4b83720..0dcc9b3b2c 100644 --- a/Source/Core/DolphinQt/Host.cpp +++ b/Source/Core/DolphinQt/Host.cpp @@ -280,9 +280,6 @@ void Host_PPCBreakpointsChanged() // We ignore these, and their purpose should be questioned individually. // In particular, RequestRenderWindowSize, RequestFullscreen, and // UpdateMainFrame should almost certainly be removed. -void Host_UpdateMainFrame() -{ -} void Host_RequestRenderWindowSize(int w, int h) { diff --git a/Source/Core/DolphinTool/ToolHeadlessPlatform.cpp b/Source/Core/DolphinTool/ToolHeadlessPlatform.cpp index 59495a7d43..83cc16d805 100644 --- a/Source/Core/DolphinTool/ToolHeadlessPlatform.cpp +++ b/Source/Core/DolphinTool/ToolHeadlessPlatform.cpp @@ -73,10 +73,6 @@ void Host_JitProfileDataWiped() { } -void Host_UpdateMainFrame() -{ -} - void Host_RequestRenderWindowSize(int width, int height) { } diff --git a/Source/DSPTool/StubHost.cpp b/Source/DSPTool/StubHost.cpp index eb263d904c..12fa967516 100644 --- a/Source/DSPTool/StubHost.cpp +++ b/Source/DSPTool/StubHost.cpp @@ -50,9 +50,6 @@ void Host_JitCacheInvalidation() void Host_JitProfileDataWiped() { } -void Host_UpdateMainFrame() -{ -} void Host_RequestRenderWindowSize(int, int) { } diff --git a/Source/UnitTests/StubHost.cpp b/Source/UnitTests/StubHost.cpp index ffbb0c41c2..3d980ee302 100644 --- a/Source/UnitTests/StubHost.cpp +++ b/Source/UnitTests/StubHost.cpp @@ -50,9 +50,6 @@ void Host_JitCacheInvalidation() void Host_JitProfileDataWiped() { } -void Host_UpdateMainFrame() -{ -} void Host_RequestRenderWindowSize(int, int) { } From 530ea7528e6a43ece73b48d7aa298000b6629002 Mon Sep 17 00:00:00 2001 From: Dentomologist Date: Sat, 2 Aug 2025 15:03:55 -0700 Subject: [PATCH 2/3] Host: Remove unnecessary functions Remove Host_RefreshDSPDebuggerWindow (which hasn't done anything since DolphinWX was removed in 44b22c90) and DSP::Host::UpdateDebugger (which only called Host_RefreshDSPDebuggerWindow). --- Source/Android/jni/MainAndroid.cpp | 4 ---- Source/Core/Core/DSP/DSPCore.cpp | 4 ---- Source/Core/Core/DSP/DSPHost.h | 1 - Source/Core/Core/HW/DSPLLE/DSPHost.cpp | 7 ------- Source/Core/Core/HW/DSPLLE/DSPLLE.cpp | 1 - Source/Core/Core/Host.h | 1 - Source/Core/DolphinNoGUI/MainNoGUI.cpp | 4 ---- Source/Core/DolphinQt/Host.cpp | 4 ---- Source/Core/DolphinTool/ToolHeadlessPlatform.cpp | 4 ---- Source/DSPTool/DSPTool.cpp | 3 --- Source/DSPTool/StubHost.cpp | 3 --- Source/UnitTests/StubHost.cpp | 3 --- 12 files changed, 39 deletions(-) diff --git a/Source/Android/jni/MainAndroid.cpp b/Source/Android/jni/MainAndroid.cpp index 0380ade0b8..646f745a13 100644 --- a/Source/Android/jni/MainAndroid.cpp +++ b/Source/Android/jni/MainAndroid.cpp @@ -110,10 +110,6 @@ void Host_PPCBreakpointsChanged() { } -void Host_RefreshDSPDebuggerWindow() -{ -} - bool Host_UIBlocksControllerState() { return false; diff --git a/Source/Core/Core/DSP/DSPCore.cpp b/Source/Core/Core/DSP/DSPCore.cpp index 41c10b2428..861c0cac23 100644 --- a/Source/Core/Core/DSP/DSPCore.cpp +++ b/Source/Core/Core/DSP/DSPCore.cpp @@ -482,8 +482,6 @@ int DSPCore::RunCycles(int cycles) m_dsp_interpreter->Step(); cycles--; - - Host::UpdateDebugger(); break; case State::Stopped: break; @@ -519,8 +517,6 @@ void DSPCore::SetState(State new_state) // kick the event, in case we are waiting if (new_state == State::Running) m_step_event.Set(); - - Host::UpdateDebugger(); } State DSPCore::GetState() const diff --git a/Source/Core/Core/DSP/DSPHost.h b/Source/Core/Core/DSP/DSPHost.h index 431e24d15a..346feb0d95 100644 --- a/Source/Core/Core/DSP/DSPHost.h +++ b/Source/Core/Core/DSP/DSPHost.h @@ -29,5 +29,4 @@ bool IsWiiHost(); void InterruptRequest(); void CodeLoaded(DSPCore& dsp, u32 addr, size_t size); void CodeLoaded(DSPCore& dsp, const u8* ptr, size_t size); -void UpdateDebugger(); } // namespace DSP::Host diff --git a/Source/Core/Core/HW/DSPLLE/DSPHost.cpp b/Source/Core/Core/HW/DSPLLE/DSPHost.cpp index 39507c98fe..75f321518f 100644 --- a/Source/Core/Core/HW/DSPLLE/DSPHost.cpp +++ b/Source/Core/Core/HW/DSPLLE/DSPHost.cpp @@ -96,14 +96,7 @@ void CodeLoaded(DSPCore& dsp, const u8* ptr, size_t size) Symbols::AutoDisassembly(state, 0x0, 0x1000); Symbols::AutoDisassembly(state, 0x8000, 0x9000); - UpdateDebugger(); - dsp.ClearIRAM(); state.GetAnalyzer().Analyze(state); } - -void UpdateDebugger() -{ - Host_RefreshDSPDebuggerWindow(); -} } // namespace DSP::Host diff --git a/Source/Core/Core/HW/DSPLLE/DSPLLE.cpp b/Source/Core/Core/HW/DSPLLE/DSPLLE.cpp index 7b3abdb14e..9925dd5354 100644 --- a/Source/Core/Core/HW/DSPLLE/DSPLLE.cpp +++ b/Source/Core/Core/HW/DSPLLE/DSPLLE.cpp @@ -161,7 +161,6 @@ bool DSPLLE::Initialize(bool wii, bool dsp_thread) m_dsp_thread = std::thread(DSPThread, this); } - Host_RefreshDSPDebuggerWindow(); return true; } diff --git a/Source/Core/Core/Host.h b/Source/Core/Core/Host.h index 8ddbbbaefb..a05508bae2 100644 --- a/Source/Core/Core/Host.h +++ b/Source/Core/Core/Host.h @@ -58,7 +58,6 @@ bool Host_TASInputHasFocus(); void Host_Message(HostMessageID id); void Host_PPCSymbolsChanged(); void Host_PPCBreakpointsChanged(); -void Host_RefreshDSPDebuggerWindow(); void Host_RequestRenderWindowSize(int width, int height); void Host_UpdateDisasmDialog(); void Host_JitCacheInvalidation(); diff --git a/Source/Core/DolphinNoGUI/MainNoGUI.cpp b/Source/Core/DolphinNoGUI/MainNoGUI.cpp index a09a2060fd..6132085b15 100644 --- a/Source/Core/DolphinNoGUI/MainNoGUI.cpp +++ b/Source/Core/DolphinNoGUI/MainNoGUI.cpp @@ -61,10 +61,6 @@ void Host_PPCBreakpointsChanged() { } -void Host_RefreshDSPDebuggerWindow() -{ -} - bool Host_UIBlocksControllerState() { return false; diff --git a/Source/Core/DolphinQt/Host.cpp b/Source/Core/DolphinQt/Host.cpp index 0dcc9b3b2c..49612b1cda 100644 --- a/Source/Core/DolphinQt/Host.cpp +++ b/Source/Core/DolphinQt/Host.cpp @@ -293,10 +293,6 @@ bool Host_UIBlocksControllerState() Core::GetState(Core::System::GetInstance()) != Core::State::Paused; } -void Host_RefreshDSPDebuggerWindow() -{ -} - void Host_TitleChanged() { #ifdef USE_DISCORD_PRESENCE diff --git a/Source/Core/DolphinTool/ToolHeadlessPlatform.cpp b/Source/Core/DolphinTool/ToolHeadlessPlatform.cpp index 83cc16d805..787209bd3e 100644 --- a/Source/Core/DolphinTool/ToolHeadlessPlatform.cpp +++ b/Source/Core/DolphinTool/ToolHeadlessPlatform.cpp @@ -29,10 +29,6 @@ void Host_PPCBreakpointsChanged() { } -void Host_RefreshDSPDebuggerWindow() -{ -} - bool Host_UIBlocksControllerState() { return false; diff --git a/Source/DSPTool/DSPTool.cpp b/Source/DSPTool/DSPTool.cpp index 2f99d56522..9deaa2920f 100644 --- a/Source/DSPTool/DSPTool.cpp +++ b/Source/DSPTool/DSPTool.cpp @@ -49,9 +49,6 @@ void DSP::Host::CodeLoaded(DSPCore& dsp, const u8* ptr, size_t size) void DSP::Host::InterruptRequest() { } -void DSP::Host::UpdateDebugger() -{ -} static std::string CodeToHeader(const std::vector& code, const std::string& filename) { diff --git a/Source/DSPTool/StubHost.cpp b/Source/DSPTool/StubHost.cpp index 12fa967516..df4ac59d2b 100644 --- a/Source/DSPTool/StubHost.cpp +++ b/Source/DSPTool/StubHost.cpp @@ -19,9 +19,6 @@ void Host_PPCSymbolsChanged() void Host_PPCBreakpointsChanged() { } -void Host_RefreshDSPDebuggerWindow() -{ -} void Host_Message(HostMessageID) { } diff --git a/Source/UnitTests/StubHost.cpp b/Source/UnitTests/StubHost.cpp index 3d980ee302..bd87bba095 100644 --- a/Source/UnitTests/StubHost.cpp +++ b/Source/UnitTests/StubHost.cpp @@ -19,9 +19,6 @@ void Host_PPCSymbolsChanged() void Host_PPCBreakpointsChanged() { } -void Host_RefreshDSPDebuggerWindow() -{ -} void Host_Message(HostMessageID) { } From 3b832e84e405ed818442f395bb69147adef497b1 Mon Sep 17 00:00:00 2001 From: Dentomologist Date: Sat, 2 Aug 2025 15:43:23 -0700 Subject: [PATCH 3/3] Host: Remove outdated comment Host_RequestFullscreen and Host_UpdateMainFrame have been removed, and Host_RequestRenderWindowSize has been used by DolphinQt since 80699096 and by Android since e8739156. --- Source/Core/DolphinQt/Host.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Source/Core/DolphinQt/Host.cpp b/Source/Core/DolphinQt/Host.cpp index 49612b1cda..46b0aa8963 100644 --- a/Source/Core/DolphinQt/Host.cpp +++ b/Source/Core/DolphinQt/Host.cpp @@ -277,10 +277,6 @@ void Host_PPCBreakpointsChanged() [] { emit Host::GetInstance()->PPCBreakpointsChanged(); }); } -// We ignore these, and their purpose should be questioned individually. -// In particular, RequestRenderWindowSize, RequestFullscreen, and -// UpdateMainFrame should almost certainly be removed. - void Host_RequestRenderWindowSize(int w, int h) { emit Host::GetInstance()->RequestRenderSize(w, h);