mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-28 11:49:06 +00: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:
parent
c76dee7807
commit
95cba6be2b
32 changed files with 717 additions and 609 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue