diff options
| author | JosJuice <josjuice@gmail.com> | 2019-08-14 13:45:07 +0200 |
|---|---|---|
| committer | JosJuice <josjuice@gmail.com> | 2019-08-14 13:45:07 +0200 |
| commit | a66ca85dd5bb219193cca8ebf3ce2f747bd62ae0 (patch) | |
| tree | 3aaf9d8b6b761a9fcff1e3dec9dd7180f18af099 /Source/Core/DolphinQt/MenuBar.cpp | |
| parent | dd8bc7b3e60642129c955f4f03f498d90ecb2c14 (diff) | |
DolphinQt: Fix the enabling/disabling of Movie items even more
Play can only be used when a game is selected and emulation is not
running. Start can be used when a game is selected (to start from
cold boot) or when emulation is running (to start from a savestate).
https://bugs.dolphin-emu.org/issues/11826
Diffstat (limited to 'Source/Core/DolphinQt/MenuBar.cpp')
| -rw-r--r-- | Source/Core/DolphinQt/MenuBar.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Source/Core/DolphinQt/MenuBar.cpp b/Source/Core/DolphinQt/MenuBar.cpp index e5f14f77d2..e68d068f1c 100644 --- a/Source/Core/DolphinQt/MenuBar.cpp +++ b/Source/Core/DolphinQt/MenuBar.cpp @@ -114,7 +114,8 @@ void MenuBar::OnEmulationStateChanged(Core::State state) m_recording_stop->setEnabled(false); m_recording_export->setEnabled(false); } - m_recording_play->setEnabled(!running); + m_recording_play->setEnabled(m_game_selected && !running); + m_recording_start->setEnabled((m_game_selected || running) && !Movie::IsPlayingInput()); // Options m_controllers_action->setEnabled(NetPlay::IsNetPlayRunning() ? !running : true); @@ -1109,15 +1110,15 @@ void MenuBar::NANDExtractCertificates() void MenuBar::OnSelectionChanged(std::shared_ptr<const UICommon::GameFile> game_file) { - const bool game_selected = !!game_file; + m_game_selected = !!game_file; - m_recording_play->setEnabled(game_selected && !Core::IsRunning()); - m_recording_start->setEnabled(game_selected && !Movie::IsPlayingInput()); + m_recording_play->setEnabled(m_game_selected && !Core::IsRunning()); + m_recording_start->setEnabled((m_game_selected || Core::IsRunning()) && !Movie::IsPlayingInput()); } void MenuBar::OnRecordingStatusChanged(bool recording) { - m_recording_start->setEnabled(!recording); + m_recording_start->setEnabled(!recording && (m_game_selected || Core::IsRunning())); m_recording_stop->setEnabled(recording); m_recording_export->setEnabled(recording); } |
