mirror of https://github.com/PCSX2/pcsx2.git
Debugger: Add automatic refresh on 1 second interval
The debugger now refreshes/updates it's widgets once a second so that the user does not need to interact with the debugger to know when data/state changes.
This commit is contained in:
parent
4919f9b18c
commit
a903387182
|
@ -142,10 +142,25 @@ CpuWidget::CpuWidget(QWidget* parent, DebugInterface& cpu)
|
|||
connect(m_ui.memorySearchWidget, &MemorySearchWidget::goToAddressInMemoryView, m_ui.memoryviewWidget, &MemoryViewWidget::gotoAddress);
|
||||
connect(m_ui.memorySearchWidget, &MemorySearchWidget::switchToMemoryViewTab, [this]() { m_ui.tabWidget->setCurrentWidget(m_ui.tab_memory); });
|
||||
m_ui.memorySearchWidget->setCpu(&m_cpu);
|
||||
|
||||
m_refreshDebuggerTimer.setInterval(1000);
|
||||
connect(&m_refreshDebuggerTimer, &QTimer::timeout, this, &CpuWidget::refreshDebugger);
|
||||
m_refreshDebuggerTimer.start();
|
||||
}
|
||||
|
||||
CpuWidget::~CpuWidget() = default;
|
||||
|
||||
void CpuWidget::refreshDebugger()
|
||||
{
|
||||
if (m_cpu.isAlive())
|
||||
{
|
||||
m_ui.registerWidget->update();
|
||||
m_ui.disassemblyWidget->update();
|
||||
m_ui.memoryviewWidget->update();
|
||||
m_ui.memorySearchWidget->update();
|
||||
}
|
||||
}
|
||||
|
||||
void CpuWidget::paintEvent(QPaintEvent* event)
|
||||
{
|
||||
m_ui.registerWidget->update();
|
||||
|
|
|
@ -74,6 +74,7 @@ public slots:
|
|||
bool getDemangleFunctions() const { return m_demangleFunctions; }
|
||||
void onModuleTreeContextMenu(QPoint pos);
|
||||
void onModuleTreeDoubleClick(QTreeWidgetItem* item);
|
||||
void refreshDebugger();
|
||||
void reloadCPUWidgets()
|
||||
{
|
||||
if (!QtHost::IsOnUIThread())
|
||||
|
@ -101,6 +102,7 @@ private:
|
|||
QMenu* m_stacklistContextMenu = 0;
|
||||
QMenu* m_funclistContextMenu = 0;
|
||||
QMenu* m_moduleTreeContextMenu = 0;
|
||||
QTimer m_refreshDebuggerTimer;
|
||||
|
||||
Ui::CpuWidget m_ui;
|
||||
|
||||
|
|
Loading…
Reference in New Issue