mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-12-16 04:09:39 +00:00
Movie: Replace a blocking RunOnCPUThread call with a CPUThreadGuard.
This commit is contained in:
parent
56532c850f
commit
6380ad6abb
@ -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;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user