mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Core/Movie: Refactor to class, move to System.
A bit of global state remains (the `header` in `BeginRecordingInput()`) due to unclear lifetime requirements.
This commit is contained in:
@ -1763,8 +1763,9 @@ bool NetPlayClient::StartGame(const std::string& path)
|
||||
|
||||
if (m_dialog->IsRecording())
|
||||
{
|
||||
if (Movie::IsReadOnly())
|
||||
Movie::SetReadOnly(false);
|
||||
auto& movie = Core::System::GetInstance().GetMovie();
|
||||
if (movie.IsReadOnly())
|
||||
movie.SetReadOnly(false);
|
||||
|
||||
Movie::ControllerTypeArray controllers{};
|
||||
Movie::WiimoteEnabledArray wiimotes{};
|
||||
@ -1778,7 +1779,7 @@ bool NetPlayClient::StartGame(const std::string& path)
|
||||
controllers[i] = Movie::ControllerType::None;
|
||||
wiimotes[i] = m_wiimote_map[i] > 0;
|
||||
}
|
||||
Movie::BeginRecordingInput(controllers, wiimotes);
|
||||
movie.BeginRecordingInput(controllers, wiimotes);
|
||||
}
|
||||
|
||||
for (unsigned int i = 0; i < 4; ++i)
|
||||
@ -2114,14 +2115,15 @@ bool NetPlayClient::GetNetPads(const int pad_nb, const bool batching, GCPadStatu
|
||||
|
||||
m_pad_buffer[pad_nb].Pop(*pad_status);
|
||||
|
||||
if (Movie::IsRecordingInput())
|
||||
auto& movie = Core::System::GetInstance().GetMovie();
|
||||
if (movie.IsRecordingInput())
|
||||
{
|
||||
Movie::RecordInput(pad_status, pad_nb);
|
||||
Movie::InputUpdate();
|
||||
movie.RecordInput(pad_status, pad_nb);
|
||||
movie.InputUpdate();
|
||||
}
|
||||
else
|
||||
{
|
||||
Movie::CheckPadStatus(pad_status, pad_nb);
|
||||
movie.CheckPadStatus(pad_status, pad_nb);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user