Qt/MenuBar: Allow opening Cheats Manager regardless of emulation state and configuration.

This commit is contained in:
Admiral H. Curtiss 2021-09-16 06:50:21 +02:00
parent aee6e45386
commit aa2d089d1b
No known key found for this signature in database
GPG Key ID: F051B4C4044F33FB
2 changed files with 1 additions and 10 deletions

View File

@ -131,9 +131,6 @@ void MenuBar::OnEmulationStateChanged(Core::State state)
// Options // Options
m_controllers_action->setEnabled(NetPlay::IsNetPlayRunning() ? !running : true); m_controllers_action->setEnabled(NetPlay::IsNetPlayRunning() ? !running : true);
// Tools
m_show_cheat_manager->setEnabled(Settings::Instance().GetCheatsEnabled() && running);
// JIT // JIT
m_jit_interpreter_core->setEnabled(running); m_jit_interpreter_core->setEnabled(running);
m_jit_block_linking->setEnabled(!running); m_jit_block_linking->setEnabled(!running);
@ -228,12 +225,7 @@ void MenuBar::AddToolsMenu()
tools_menu->addAction(tr("&Resource Pack Manager"), this, tools_menu->addAction(tr("&Resource Pack Manager"), this,
[this] { emit ShowResourcePackManager(); }); [this] { emit ShowResourcePackManager(); });
m_show_cheat_manager = tools_menu->addAction(tr("&Cheats Manager"), this, [this] { emit ShowCheatsManager(); });
tools_menu->addAction(tr("&Cheats Manager"), this, [this] { emit ShowCheatsManager(); });
connect(&Settings::Instance(), &Settings::EnableCheatsChanged, this, [this](bool enabled) {
m_show_cheat_manager->setEnabled(Core::GetState() != Core::State::Uninitialized && enabled);
});
tools_menu->addAction(tr("FIFO Player"), this, &MenuBar::ShowFIFOPlayer); tools_menu->addAction(tr("FIFO Player"), this, &MenuBar::ShowFIFOPlayer);

View File

@ -196,7 +196,6 @@ private:
QMenu* m_backup_menu; QMenu* m_backup_menu;
// Tools // Tools
QAction* m_show_cheat_manager;
QAction* m_wad_install_action; QAction* m_wad_install_action;
QMenu* m_perform_online_update_menu; QMenu* m_perform_online_update_menu;
QAction* m_perform_online_update_for_current_region; QAction* m_perform_online_update_for_current_region;