mirror of
https://github.com/holub/mame
synced 2025-06-20 11:16:37 +03:00
debugimgui: send character inputs to the debugger view with focus, allows editing in memory views.
This commit is contained in:
parent
35a8c3a53b
commit
d3410b72a1
@ -261,6 +261,16 @@ void debug_imgui::handle_keys()
|
|||||||
{
|
{
|
||||||
ImGuiIO& io = ImGui::GetIO();
|
ImGuiIO& io = ImGui::GetIO();
|
||||||
ui_event event;
|
ui_event event;
|
||||||
|
debug_area* focus_view = nullptr;
|
||||||
|
|
||||||
|
// find view that has focus (should only be one at a time)
|
||||||
|
for(std::vector<debug_area*>::iterator view_ptr = view_list.begin();view_ptr != view_list.end();++view_ptr)
|
||||||
|
if((*view_ptr)->has_focus)
|
||||||
|
focus_view = *view_ptr;
|
||||||
|
|
||||||
|
// check views in main views also (only the disassembler view accepts inputs)
|
||||||
|
if(view_main_disasm->has_focus)
|
||||||
|
focus_view = view_main_disasm;
|
||||||
|
|
||||||
if(m_machine->input().code_pressed(KEYCODE_LCONTROL))
|
if(m_machine->input().code_pressed(KEYCODE_LCONTROL))
|
||||||
io.KeyCtrl = true;
|
io.KeyCtrl = true;
|
||||||
@ -290,6 +300,8 @@ void debug_imgui::handle_keys()
|
|||||||
{
|
{
|
||||||
case UI_EVENT_CHAR:
|
case UI_EVENT_CHAR:
|
||||||
m_key_char = event.ch;
|
m_key_char = event.ch;
|
||||||
|
if(focus_view != nullptr)
|
||||||
|
focus_view->view->process_char(m_key_char);
|
||||||
return;
|
return;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user