mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -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:
@ -146,7 +146,8 @@ void MenuBar::OnEmulationStateChanged(Core::State state)
|
||||
#else // USE_RETRO_ACHIEVEMENTS
|
||||
m_recording_play->setEnabled(m_game_selected && !running);
|
||||
#endif // USE_RETRO_ACHIEVEMENTS
|
||||
m_recording_start->setEnabled((m_game_selected || running) && !Movie::IsPlayingInput());
|
||||
m_recording_start->setEnabled((m_game_selected || running) &&
|
||||
!Core::System::GetInstance().GetMovie().IsPlayingInput());
|
||||
|
||||
// JIT
|
||||
m_jit_interpreter_core->setEnabled(running);
|
||||
@ -775,8 +776,9 @@ void MenuBar::AddMovieMenu()
|
||||
|
||||
m_recording_read_only = movie_menu->addAction(tr("&Read-Only Mode"));
|
||||
m_recording_read_only->setCheckable(true);
|
||||
m_recording_read_only->setChecked(Movie::IsReadOnly());
|
||||
connect(m_recording_read_only, &QAction::toggled, [](bool value) { Movie::SetReadOnly(value); });
|
||||
m_recording_read_only->setChecked(Core::System::GetInstance().GetMovie().IsReadOnly());
|
||||
connect(m_recording_read_only, &QAction::toggled,
|
||||
[](bool value) { Core::System::GetInstance().GetMovie().SetReadOnly(value); });
|
||||
|
||||
movie_menu->addAction(tr("TAS Input"), this, [this] { emit ShowTASInput(); });
|
||||
|
||||
@ -1231,7 +1233,8 @@ void MenuBar::OnSelectionChanged(std::shared_ptr<const UICommon::GameFile> game_
|
||||
m_game_selected = !!game_file;
|
||||
|
||||
m_recording_play->setEnabled(m_game_selected && !Core::IsRunning());
|
||||
m_recording_start->setEnabled((m_game_selected || Core::IsRunning()) && !Movie::IsPlayingInput());
|
||||
m_recording_start->setEnabled((m_game_selected || Core::IsRunning()) &&
|
||||
!Core::System::GetInstance().GetMovie().IsPlayingInput());
|
||||
}
|
||||
|
||||
void MenuBar::OnRecordingStatusChanged(bool recording)
|
||||
|
Reference in New Issue
Block a user