Skip to content
Permalink
Browse files

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
  • Loading branch information...
JosJuice committed Aug 14, 2019
1 parent dd8bc7b commit a66ca85dd5bb219193cca8ebf3ce2f747bd62ae0
Showing with 8 additions and 5 deletions.
  1. +6 −5 Source/Core/DolphinQt/MenuBar.cpp
  2. +2 −0 Source/Core/DolphinQt/MenuBar.h
@@ -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);
}
@@ -259,4 +259,6 @@ class MenuBar final : public QMenuBar
QAction* m_jit_paired_off;
QAction* m_jit_systemregisters_off;
QAction* m_jit_branch_off;

bool m_game_selected = false;
};

0 comments on commit a66ca85

Please sign in to comment.
You can’t perform that action at this time.