diff options
author | 2016-06-06 19:06:44 +1200 | |
---|---|---|
committer | 2016-06-06 19:07:33 +1200 | |
commit | d3410b72a1a45a0197734e1ad8ca13e3c220f9d7 (patch) | |
tree | 8eb36f8aa689796355f2608b0e162927da9dde16 /src/osd/modules/debugger/debugimgui.cpp | |
parent | 35a8c3a53bede96df063990a97ef09ab8358862d (diff) |
debugimgui: send character inputs to the debugger view with focus, allows editing in memory views.
Diffstat (limited to 'src/osd/modules/debugger/debugimgui.cpp')
-rw-r--r-- | src/osd/modules/debugger/debugimgui.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/osd/modules/debugger/debugimgui.cpp b/src/osd/modules/debugger/debugimgui.cpp index 1b6858df5eb..25f6938f4fa 100644 --- a/src/osd/modules/debugger/debugimgui.cpp +++ b/src/osd/modules/debugger/debugimgui.cpp @@ -261,6 +261,16 @@ void debug_imgui::handle_keys() { ImGuiIO& io = ImGui::GetIO(); 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)) io.KeyCtrl = true; @@ -290,6 +300,8 @@ void debug_imgui::handle_keys() { case UI_EVENT_CHAR: m_key_char = event.ch; + if(focus_view != nullptr) + focus_view->view->process_char(m_key_char); return; default: break; |