From 2ee7021cda124139928f0b70393c229e337ed9e8 Mon Sep 17 00:00:00 2001 From: Techjar Date: Sun, 8 Jul 2018 14:32:40 -0400 Subject: [PATCH] Qt/MenuBar: Add missing JIT branch option in debugger --- Source/Core/DolphinQt/MenuBar.cpp | 11 ++++++++++- Source/Core/DolphinQt/MenuBar.h | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Source/Core/DolphinQt/MenuBar.cpp b/Source/Core/DolphinQt/MenuBar.cpp index 0f8139034f..6b3069f565 100644 --- a/Source/Core/DolphinQt/MenuBar.cpp +++ b/Source/Core/DolphinQt/MenuBar.cpp @@ -121,7 +121,8 @@ void MenuBar::OnEmulationStateChanged(Core::State state) for (QAction* action : {m_jit_off, m_jit_loadstore_off, m_jit_loadstore_lbzx_off, m_jit_loadstore_lxz_off, m_jit_loadstore_lwz_off, m_jit_loadstore_floating_off, m_jit_loadstore_paired_off, - m_jit_floatingpoint_off, m_jit_integer_off, m_jit_paired_off, m_jit_systemregisters_off}) + m_jit_floatingpoint_off, m_jit_integer_off, m_jit_paired_off, m_jit_systemregisters_off, + m_jit_branch_off}) { action->setEnabled(running && !playing); } @@ -848,6 +849,14 @@ void MenuBar::AddJITMenu() SConfig::GetInstance().bJITSystemRegistersOff = enabled; ClearCache(); }); + + m_jit_branch_off = m_jit->addAction(tr("JIT Branch Off")); + m_jit_branch_off->setCheckable(true); + m_jit_branch_off->setChecked(SConfig::GetInstance().bJITBranchOff); + connect(m_jit_branch_off, &QAction::toggled, [this](bool enabled) { + SConfig::GetInstance().bJITBranchOff = enabled; + ClearCache(); + }); } void MenuBar::AddSymbolsMenu() diff --git a/Source/Core/DolphinQt/MenuBar.h b/Source/Core/DolphinQt/MenuBar.h index b61a4347e8..7ea12aa02f 100644 --- a/Source/Core/DolphinQt/MenuBar.h +++ b/Source/Core/DolphinQt/MenuBar.h @@ -239,4 +239,5 @@ private: QAction* m_jit_integer_off; QAction* m_jit_paired_off; QAction* m_jit_systemregisters_off; + QAction* m_jit_branch_off; };