diff options
author | 2019-11-18 05:08:36 +1100 | |
---|---|---|
committer | 2019-11-18 05:08:36 +1100 | |
commit | 88ce545cdda64659894b87fc0b98e1b044eea3e0 (patch) | |
tree | 9a1f05f459b773c70a2ef64443cbe8fee2a3ccd1 /src/osd/modules/debugger/qt/dasmwindow.cpp | |
parent | 1fbfa9e071fe1824ea47c567c23778d8ab33cacf (diff) |
misc cleanup:
* Got rid of some more simple_list in core debugger code
* Fixed a buffer overrun in wavwrite (buffer half requried size)
* Slightly reduced dependencies and overhead in wavwrite
* Made new disassembly windows in Qt debugger default to current CPU
Diffstat (limited to 'src/osd/modules/debugger/qt/dasmwindow.cpp')
-rw-r--r-- | src/osd/modules/debugger/qt/dasmwindow.cpp | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/src/osd/modules/debugger/qt/dasmwindow.cpp b/src/osd/modules/debugger/qt/dasmwindow.cpp index 5c575b400b1..04cbd523cdd 100644 --- a/src/osd/modules/debugger/qt/dasmwindow.cpp +++ b/src/osd/modules/debugger/qt/dasmwindow.cpp @@ -52,9 +52,7 @@ DasmWindow::DasmWindow(running_machine* machine, QWidget* parent) : // Populate the combo box & set the proper cpu populateComboBox(); - //const debug_view_source *source = mem->views[0]->view->source_for_device(curcpu); - //gtk_combo_box_set_active(zone_w, mem->views[0]->view->source_list().indexof(*source)); - //mem->views[0]->view->set_source(*source); + setToCurrentCpu(); // Layout @@ -121,7 +119,7 @@ DasmWindow::~DasmWindow() void DasmWindow::cpuChanged(int index) { - m_dasmView->view()->set_source(*m_dasmView->view()->source_list().find(index)); + m_dasmView->view()->set_source(*m_dasmView->view()->source(index)); m_dasmView->viewport()->update(); } @@ -253,9 +251,24 @@ void DasmWindow::populateComboBox() return; m_cpuComboBox->clear(); - for (const debug_view_source &source : m_dasmView->view()->source_list()) + for (auto &source : m_dasmView->view()->source_list()) { - m_cpuComboBox->addItem(source.name()); + m_cpuComboBox->addItem(source->name()); + } +} + + +void DasmWindow::setToCurrentCpu() +{ + device_t* curCpu = m_machine->debugger().cpu().get_visible_cpu(); + if (curCpu) + { + const debug_view_source *source = m_dasmView->view()->source_for_device(curCpu); + if (source) + { + const int listIndex = m_dasmView->view()->source_index(*source); + m_cpuComboBox->setCurrentIndex(listIndex); + } } } |