debugimgui: fix lockup and debug assert

This commit is contained in:
Barry Rodewald 2024-02-09 13:59:15 +13:00
parent 33a2fe7045
commit 6fbb1d2f35

View File

@ -418,15 +418,15 @@ void debug_imgui::handle_keys()
m_hide = true;
}
if(ImGui::IsKeyPressed(ImGuiKey_D,false) && ImGui::IsKeyDown(ImGuiKey_LeftCtrl))
if(ImGui::IsKeyPressed(ImGuiKey_D,false) && io.KeyCtrl)
add_disasm(++m_win_count);
if(ImGui::IsKeyPressed(ImGuiKey_M,false) && ImGui::IsKeyDown(ImGuiKey_LeftCtrl))
if(ImGui::IsKeyPressed(ImGuiKey_M,false) && io.KeyCtrl)
add_memory(++m_win_count);
if(ImGui::IsKeyPressed(ImGuiKey_B,false) && ImGui::IsKeyDown(ImGuiKey_LeftCtrl))
if(ImGui::IsKeyPressed(ImGuiKey_B,false) && io.KeyCtrl)
add_bpoints(++m_win_count);
if(ImGui::IsKeyPressed(ImGuiKey_W,false) && ImGui::IsKeyDown(ImGuiKey_LeftCtrl))
if(ImGui::IsKeyPressed(ImGuiKey_W,false) && io.KeyCtrl)
add_wpoints(++m_win_count);
if(ImGui::IsKeyPressed(ImGuiKey_L,false) && ImGui::IsKeyDown(ImGuiKey_LeftCtrl))
if(ImGui::IsKeyPressed(ImGuiKey_L,false) && io.KeyCtrl)
add_log(++m_win_count);
}
@ -618,7 +618,10 @@ void debug_imgui::draw_view(debug_area* view_ptr, bool exp_change)
// temporarily set cursor to the last line, this will set the scroll bar range
if(view_ptr->type != DVT_MEMORY) // no scroll bars in memory views
{
ImGui::SetCursorPosY((totalsize.y) * fsize.y);
ImGui::Dummy(ImVec2(0,0)); // some object is required for validation
}
// set the visible area to be displayed
vsize.x = view_ptr->view_width / fsize.x;
@ -1555,7 +1558,7 @@ void debug_imgui::wait_for_debugger(device_t &device, bool firststop)
m_running = false;
}
m_hide = false;
//m_machine->ui_input().frame_update();
m_machine->osd().input_update(true);
handle_mouse();
handle_keys();
handle_console(m_machine);
@ -1580,6 +1583,7 @@ void debug_imgui::debugger_update()
{
uint32_t width = m_machine->render().ui_target().width();
uint32_t height = m_machine->render().ui_target().height();
m_machine->osd().input_update(true);
handle_mouse();
handle_keys();
imguiBeginFrame(m_mouse_x,m_mouse_y,m_mouse_button ? IMGUI_MBUT_LEFT : 0, 0, width, height, m_key_char);