Skip to content

Commit

Permalink
debugger/debugimgui.cpp: Refuse to break if unable to take over UI in…
Browse files Browse the repository at this point in the history
…put.
  • Loading branch information
cuavas committed Apr 11, 2024
1 parent ea9888f commit e45ebde
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions src/osd/modules/debugger/debugimgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1591,27 +1591,31 @@ void debug_imgui::wait_for_debugger(device_t &device, bool firststop)
}
if(firststop)
{
// debug_show_all();
device.machine().ui_input().reset();
//debug_show_all();
m_running = false;
}
if(!m_take_ui)
{
m_take_ui = m_machine->ui().set_ui_event_handler([this] () { return m_take_ui; });
if(m_take_ui)
m_machine->ui_input().reset();
if (!m_machine->ui().set_ui_event_handler([this] () { return m_take_ui; }))
{
// can't break if we can't take over UI input
m_machine->debugger().console().get_visible_cpu()->debug()->go();
m_running = true;
return;
}
m_take_ui = true;

}
m_hide = false;
m_machine->osd().input_update(true);
m_machine->osd().input_update(false);
handle_events();
handle_console(m_machine);
update_cpu_view(&device);
imguiBeginFrame(m_mouse_x,m_mouse_y,m_mouse_button ? IMGUI_MBUT_LEFT : 0, 0, width, height,m_key_char);
imguiBeginFrame(m_mouse_x, m_mouse_y, m_mouse_button ? IMGUI_MBUT_LEFT : 0, 0, width, height,m_key_char);
handle_mouse_views();
handle_keys_views();
update();
imguiEndFrame();
m_machine->ui_input().reset(); // clear remaining inputs, so they don't fall through to the UI
device.machine().osd().update(false);
osd_sleep(osd_ticks_per_second() / 1000 * 50);
}
Expand Down

0 comments on commit e45ebde

Please sign in to comment.