summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author mahlemiut <bsr@xnet.co.nz>2016-06-06 19:06:44 +1200
committer mahlemiut <bsr@xnet.co.nz>2016-06-06 19:07:33 +1200
commitd3410b72a1a45a0197734e1ad8ca13e3c220f9d7 (patch)
tree8eb36f8aa689796355f2608b0e162927da9dde16 /src
parent35a8c3a53bede96df063990a97ef09ab8358862d (diff)
debugimgui: send character inputs to the debugger view with focus, allows editing in memory views.
Diffstat (limited to 'src')
-rw-r--r--src/osd/modules/debugger/debugimgui.cpp12
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;