From 2c861e75f50b8d479d5e21665d1307c7eec7e5a9 Mon Sep 17 00:00:00 2001 From: aldelaro5 Date: Sun, 13 May 2018 17:39:44 -0400 Subject: [PATCH] Qt/debugger: only consider debugger hotkeys if debugging is enabled --- Source/Core/DolphinQt2/HotkeyScheduler.cpp | 35 ++++++++++++---------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/Source/Core/DolphinQt2/HotkeyScheduler.cpp b/Source/Core/DolphinQt2/HotkeyScheduler.cpp index b411494e4d..73862102af 100644 --- a/Source/Core/DolphinQt2/HotkeyScheduler.cpp +++ b/Source/Core/DolphinQt2/HotkeyScheduler.cpp @@ -213,29 +213,32 @@ void HotkeyScheduler::Run() IsHotkey(HK_TRIGGER_SYNC_BUTTON, true)); } - if (IsHotkey(HK_STEP)) - emit Step(); + if (SConfig::GetInstance().bEnableDebugging) + { + if (IsHotkey(HK_STEP)) + emit Step(); - if (IsHotkey(HK_STEP_OVER)) - emit StepOver(); + if (IsHotkey(HK_STEP_OVER)) + emit StepOver(); - if (IsHotkey(HK_STEP_OUT)) - emit StepOut(); + if (IsHotkey(HK_STEP_OUT)) + emit StepOut(); - if (IsHotkey(HK_SKIP)) - emit Skip(); + if (IsHotkey(HK_SKIP)) + emit Skip(); - if (IsHotkey(HK_SHOW_PC)) - emit ShowPC(); + if (IsHotkey(HK_SHOW_PC)) + emit ShowPC(); - if (IsHotkey(HK_SET_PC)) - emit Skip(); + if (IsHotkey(HK_SET_PC)) + emit Skip(); - if (IsHotkey(HK_BP_TOGGLE)) - emit ToggleBreakpoint(); + if (IsHotkey(HK_BP_TOGGLE)) + emit ToggleBreakpoint(); - if (IsHotkey(HK_BP_ADD)) - emit AddBreakpoint(); + if (IsHotkey(HK_BP_ADD)) + emit AddBreakpoint(); + } // TODO: HK_MBP_ADD