Merge pull request #14127 from jordan-woyak/movie-cpu-thread-guard

Movie: Replace a blocking RunOnCPUThread call with a CPUThreadGuard.
This commit is contained in:
Jordan Woyak 2025-11-19 13:43:05 -06:00 committed by GitHub
commit d0341b3bfc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -493,7 +493,10 @@ bool MovieManager::BeginRecordingInput(const ControllerTypeArray& controllers,
(controllers == ControllerTypeArray{} && wiimotes == WiimoteEnabledArray{}))
return false;
const auto start_recording = [this, controllers, wiimotes] {
Core::DisplayMessage("Starting movie recording", 2000);
Core::CPUThreadGuard cpu_thread_guard{m_system};
m_controllers = controllers;
m_wiimotes = wiimotes;
m_current_frame = m_total_frames = 0;
@ -563,10 +566,7 @@ bool MovieManager::BeginRecordingInput(const ControllerTypeArray& controllers,
if (Core::IsRunning(m_system))
Core::UpdateWantDeterminism(m_system);
};
Core::RunOnCPUThread(m_system, start_recording, true);
Core::DisplayMessage("Starting movie recording", 2000);
return true;
}