mirror of
https://github.com/holub/mame
synced 2025-07-05 18:08:04 +03:00
QT Debugger fixes:
- New memory windows start focused on the active CPU. - Opening a utility window, closing it, and stepping no longer re-opens the window. [Andrew Gardner]
This commit is contained in:
parent
a08ae67178
commit
8cc2092788
@ -6,7 +6,7 @@
|
||||
|
||||
|
||||
DasmWindow::DasmWindow(running_machine* machine, QWidget* parent) :
|
||||
WindowQt(machine, parent)
|
||||
WindowQt(machine, NULL)
|
||||
{
|
||||
setWindowTitle("Debug: Disassembly View");
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
|
||||
LogWindow::LogWindow(running_machine* machine, QWidget* parent) :
|
||||
WindowQt(machine, parent)
|
||||
WindowQt(machine, NULL)
|
||||
{
|
||||
setWindowTitle("Debug: Machine Log");
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
|
||||
MainWindow::MainWindow(running_machine* machine, QWidget* parent) :
|
||||
WindowQt(machine, parent),
|
||||
WindowQt(machine, NULL),
|
||||
m_historyIndex(0),
|
||||
m_inputHistory()
|
||||
{
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
|
||||
MemoryWindow::MemoryWindow(running_machine* machine, QWidget* parent) :
|
||||
WindowQt(machine, parent)
|
||||
WindowQt(machine, NULL)
|
||||
{
|
||||
setWindowTitle("Debug: Memory View");
|
||||
|
||||
@ -41,6 +41,8 @@ MemoryWindow::MemoryWindow(running_machine* machine, QWidget* parent) :
|
||||
// Populate the combo box
|
||||
populateComboBox();
|
||||
|
||||
// Set to the current CPU's memory view
|
||||
setToCurrentCpu();
|
||||
|
||||
// Layout
|
||||
QHBoxLayout* subLayout = new QHBoxLayout(topSubFrame);
|
||||
@ -212,9 +214,13 @@ void MemoryWindow::populateComboBox()
|
||||
{
|
||||
m_memoryComboBox->addItem(source->name());
|
||||
}
|
||||
|
||||
// TODO: Set to the proper memory view
|
||||
//const debug_view_source *source = mem->views[0]->view->source_list().match_device(curcpu);
|
||||
//gtk_combo_box_set_active(zone_w, mem->views[0]->view->source_list().index(*source));
|
||||
//mem->views[0]->view->set_source(*source);
|
||||
}
|
||||
|
||||
|
||||
void MemoryWindow::setToCurrentCpu()
|
||||
{
|
||||
device_t* curCpu = debug_cpu_get_visible_cpu(*m_machine);
|
||||
const debug_view_source *source = m_memTable->view()->source_list().match_device(curCpu);
|
||||
const int listIndex = m_memTable->view()->source_list().index(*source);
|
||||
m_memoryComboBox->setCurrentIndex(listIndex);
|
||||
}
|
||||
|
@ -31,6 +31,7 @@ private slots:
|
||||
|
||||
private:
|
||||
void populateComboBox();
|
||||
void setToCurrentCpu();
|
||||
|
||||
|
||||
private:
|
||||
|
@ -28,6 +28,13 @@ DebuggerView::DebuggerView(const debug_view_type& type,
|
||||
}
|
||||
|
||||
|
||||
DebuggerView::~DebuggerView()
|
||||
{
|
||||
if (m_machine && m_view)
|
||||
m_machine->debug_view().free_view(*m_view);
|
||||
}
|
||||
|
||||
|
||||
void DebuggerView::paintEvent(QPaintEvent* event)
|
||||
{
|
||||
// Tell the MAME debug view how much real estate is available
|
||||
|
@ -14,7 +14,7 @@ public:
|
||||
DebuggerView(const debug_view_type& type,
|
||||
running_machine* machine,
|
||||
QWidget* parent=NULL);
|
||||
virtual ~DebuggerView() {}
|
||||
virtual ~DebuggerView();
|
||||
|
||||
void paintEvent(QPaintEvent* event);
|
||||
|
||||
|
@ -12,11 +12,16 @@ bool WindowQt::s_refreshAll = false;
|
||||
bool WindowQt::s_hideAll = false;
|
||||
|
||||
|
||||
// Since all debug windows are intended to be top-level, this inherited
|
||||
// constructor is always called with a NULL parent. The passed-in parent widget,
|
||||
// however, is often used to place each child window & the code to do this can
|
||||
// be found in most of the inherited classes.
|
||||
|
||||
WindowQt::WindowQt(running_machine* machine, QWidget* parent) :
|
||||
QMainWindow(parent),
|
||||
m_machine(machine)
|
||||
{
|
||||
//setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
|
||||
// The Debug menu bar
|
||||
QAction* debugActOpenMemory = new QAction("New &Memory Window", this);
|
||||
|
Loading…
Reference in New Issue
Block a user