summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/debugger/debugwin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/osd/modules/debugger/debugwin.cpp')
-rw-r--r--src/osd/modules/debugger/debugwin.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/osd/modules/debugger/debugwin.cpp b/src/osd/modules/debugger/debugwin.cpp
index 8ff26d40fb3..9b2ef525e96 100644
--- a/src/osd/modules/debugger/debugwin.cpp
+++ b/src/osd/modules/debugger/debugwin.cpp
@@ -235,16 +235,20 @@ void debugger_windows::debugger_update()
// if we're running live, do some checks
if (!winwindow_has_focus() && m_machine && !m_machine->debugger().cpu().is_stopped() && (m_machine->phase() == machine_phase::RUNNING))
{
- // see if the interrupt key is pressed and break if it is
- if (seq_pressed())
+ // check to see if a debugger window has focus
+ if (std::any_of(m_window_list.begin(), m_window_list.end(), [](auto const& window) { return window->has_focus(); }))
{
- HWND const focuswnd = GetFocus();
+ // see if the interrupt key is pressed and break if it is
+ if (seq_pressed())
+ {
+ HWND const focuswnd = GetFocus();
- m_machine->debugger().debug_break();
+ m_machine->debugger().debug_break();
- // if we were focused on some window's edit box, reset it to default
- for (auto &info : m_window_list)
- info->restore_field(focuswnd);
+ // if we were focused on some window's edit box, reset it to default
+ for (auto& info : m_window_list)
+ info->restore_field(focuswnd);
+ }
}
}
}