Skip to content

Commit

Permalink
Merge pull request dolphin-emu#8314 from JosJuice/menubar-movie-more
Browse files Browse the repository at this point in the history
DolphinQt: Fix the enabling/disabling of Movie items even more
  • Loading branch information
Helios747 authored Aug 21, 2019
2 parents 35eb63d + a66ca85 commit bf9427f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Source/Core/DolphinQt/MenuBar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
}
Expand Down
2 changes: 2 additions & 0 deletions Source/Core/DolphinQt/MenuBar.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 bf9427f

Please sign in to comment.