diff options
Diffstat (limited to 'src/osd/modules/debugger/debugimgui.cpp')
-rw-r--r-- | src/osd/modules/debugger/debugimgui.cpp | 48 |
1 files changed, 28 insertions, 20 deletions
diff --git a/src/osd/modules/debugger/debugimgui.cpp b/src/osd/modules/debugger/debugimgui.cpp index 5c49d2df9a3..4cbca2cf5fc 100644 --- a/src/osd/modules/debugger/debugimgui.cpp +++ b/src/osd/modules/debugger/debugimgui.cpp @@ -79,8 +79,16 @@ class debug_imgui : public osd_module, public debug_module public: debug_imgui() : osd_module(OSD_DEBUG_PROVIDER, "imgui"), debug_module(), - m_machine(nullptr), - m_hide(false), + m_machine(nullptr), + m_mouse_x(0), + m_mouse_y(0), + m_mouse_button(false), + m_prev_mouse_button(false), + m_running(false), + font_name(nullptr), + font_size(0), + m_key_char(0), + m_hide(false), m_win_count(0) { } @@ -322,7 +330,7 @@ void debug_imgui::handle_keys() else io.KeyAlt = false; - for(input_item_id id = ITEM_ID_A; id <= ITEM_ID_CANCEL; id++) + for(input_item_id id = ITEM_ID_A; id <= ITEM_ID_CANCEL; ++id) { if(m_machine->input().code_pressed(input_code(DEVICE_CLASS_KEYBOARD, 0, ITEM_CLASS_SWITCH, ITEM_MODIFIER_NONE, id))) io.KeysDown[id] = true; @@ -610,13 +618,13 @@ void debug_imgui::draw_disasm(debug_area* view_ptr, bool* opened) debug_view_disasm* disasm = downcast<debug_view_disasm*>(view_ptr->view); int rightcol = disasm->right_column(); - if(ImGui::MenuItem("Raw opcodes",NULL,(rightcol == DASM_RIGHTCOL_RAW) ? true : false)) + if(ImGui::MenuItem("Raw opcodes", nullptr,(rightcol == DASM_RIGHTCOL_RAW) ? true : false)) disasm->set_right_column(DASM_RIGHTCOL_RAW); - if(ImGui::MenuItem("Encrypted opcodes",NULL,(rightcol == DASM_RIGHTCOL_ENCRYPTED) ? true : false)) + if(ImGui::MenuItem("Encrypted opcodes", nullptr,(rightcol == DASM_RIGHTCOL_ENCRYPTED) ? true : false)) disasm->set_right_column(DASM_RIGHTCOL_ENCRYPTED); - if(ImGui::MenuItem("No opcodes",NULL,(rightcol == DASM_RIGHTCOL_NONE) ? true : false)) + if(ImGui::MenuItem("No opcodes", nullptr,(rightcol == DASM_RIGHTCOL_NONE) ? true : false)) disasm->set_right_column(DASM_RIGHTCOL_NONE); - if(ImGui::MenuItem("Comments",NULL,(rightcol == DASM_RIGHTCOL_COMMENTS) ? true : false)) + if(ImGui::MenuItem("Comments", nullptr,(rightcol == DASM_RIGHTCOL_COMMENTS) ? true : false)) disasm->set_right_column(DASM_RIGHTCOL_COMMENTS); ImGui::EndMenu(); @@ -748,27 +756,27 @@ void debug_imgui::draw_memory(debug_area* view_ptr, bool* opened) int format = mem->get_data_format(); UINT32 chunks = mem->chunks_per_row(); - if(ImGui::MenuItem("1-byte chunks",NULL,(format == 1) ? true : false)) + if(ImGui::MenuItem("1-byte chunks", nullptr,(format == 1) ? true : false)) mem->set_data_format(1); - if(ImGui::MenuItem("2-byte chunks",NULL,(format == 2) ? true : false)) + if(ImGui::MenuItem("2-byte chunks", nullptr,(format == 2) ? true : false)) mem->set_data_format(2); - if(ImGui::MenuItem("4-byte chunks",NULL,(format == 4) ? true : false)) + if(ImGui::MenuItem("4-byte chunks", nullptr,(format == 4) ? true : false)) mem->set_data_format(4); - if(ImGui::MenuItem("8-byte chunks",NULL,(format == 8) ? true : false)) + if(ImGui::MenuItem("8-byte chunks", nullptr,(format == 8) ? true : false)) mem->set_data_format(8); - if(ImGui::MenuItem("32-bit floating point",NULL,(format == 9) ? true : false)) + if(ImGui::MenuItem("32-bit floating point", nullptr,(format == 9) ? true : false)) mem->set_data_format(9); - if(ImGui::MenuItem("64-bit floating point",NULL,(format == 10) ? true : false)) + if(ImGui::MenuItem("64-bit floating point", nullptr,(format == 10) ? true : false)) mem->set_data_format(10); - if(ImGui::MenuItem("80-bit floating point",NULL,(format == 11) ? true : false)) + if(ImGui::MenuItem("80-bit floating point", nullptr,(format == 11) ? true : false)) mem->set_data_format(11); ImGui::Separator(); - if(ImGui::MenuItem("Logical addresses",NULL,!physical)) + if(ImGui::MenuItem("Logical addresses", nullptr,!physical)) mem->set_physical(false); - if(ImGui::MenuItem("Physical addresses",NULL,physical)) + if(ImGui::MenuItem("Physical addresses", nullptr,physical)) mem->set_physical(true); ImGui::Separator(); - if(ImGui::MenuItem("Reverse view",NULL,rev)) + if(ImGui::MenuItem("Reverse view", nullptr,rev)) mem->set_reverse(!rev); ImGui::Separator(); if(ImGui::MenuItem("Increase bytes per line")) @@ -894,7 +902,7 @@ void debug_imgui::draw_console() ImGuiWindowFlags flags = ImGuiWindowFlags_MenuBar | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse; ImGui::SetNextWindowSize(ImVec2(view_main_regs->width + view_main_disasm->width,view_main_disasm->height + view_main_console->height + ImGui::GetTextLineHeight()*3),ImGuiSetCond_Once); - if(ImGui::Begin(view_main_console->title.c_str(),NULL,flags)) + if(ImGui::Begin(view_main_console->title.c_str(), nullptr,flags)) { const debug_view_char *viewdata; debug_view_xy vsize,totalsize; @@ -975,7 +983,7 @@ void debug_imgui::draw_console() collapsed = true; ImGui::End(); } - if(ImGui::MenuItem((*view_ptr)->title.c_str(),NULL,!collapsed)) + if(ImGui::MenuItem((*view_ptr)->title.c_str(), nullptr,!collapsed)) ImGui::SetWindowCollapsed((*view_ptr)->title.c_str(),false); } ImGui::EndMenu(); @@ -1176,7 +1184,7 @@ void debug_imgui::update() to_delete = (*view_ptr); break; } - view_ptr++; + ++view_ptr; count++; } // check for a closed window |