From d0de0a3f478a8a491c5b7dad8369dc0961110925 Mon Sep 17 00:00:00 2001 From: Dentomologist Date: Sat, 2 Aug 2025 14:26:15 -0700 Subject: [PATCH] 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) { }