summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2015-01-12 16:35:45 +0100
committerbunnei <bunneidev@gmail.com>2015-01-12 16:35:45 +0100
commit3683369500ae4244365ab2598c6fa2bf839970f0 (patch)
treeefa0e7bbdb4c53553658b6ee33c588f6cf200b1b
parentMerge pull request #472 from lioncash/overflow (diff)
parentQt Callstack: Clear the callstack every time it's updated (diff)
downloadyuzu-3683369500ae4244365ab2598c6fa2bf839970f0.tar
yuzu-3683369500ae4244365ab2598c6fa2bf839970f0.tar.gz
yuzu-3683369500ae4244365ab2598c6fa2bf839970f0.tar.bz2
yuzu-3683369500ae4244365ab2598c6fa2bf839970f0.tar.lz
yuzu-3683369500ae4244365ab2598c6fa2bf839970f0.tar.xz
yuzu-3683369500ae4244365ab2598c6fa2bf839970f0.tar.zst
yuzu-3683369500ae4244365ab2598c6fa2bf839970f0.zip
-rw-r--r--src/citra_qt/debugger/callstack.cpp11
-rw-r--r--src/citra_qt/debugger/callstack.h3
2 files changed, 14 insertions, 0 deletions
diff --git a/src/citra_qt/debugger/callstack.cpp b/src/citra_qt/debugger/callstack.cpp
index 025a5896b..9bb22ca2e 100644
--- a/src/citra_qt/debugger/callstack.cpp
+++ b/src/citra_qt/debugger/callstack.cpp
@@ -33,6 +33,8 @@ void CallstackWidget::OnDebugModeEntered()
u32 sp = app_core->GetReg(13); //stack pointer
u32 ret_addr, call_addr, func_addr;
+ Clear();
+
int counter = 0;
for (u32 addr = 0x10000000; addr >= sp; addr -= 4)
{
@@ -76,3 +78,12 @@ void CallstackWidget::OnDebugModeLeft()
{
}
+
+void CallstackWidget::Clear()
+{
+ for (int row = 0; row < callstack_model->rowCount(); row++) {
+ for (int column = 0; column < callstack_model->columnCount(); column++) {
+ callstack_model->setItem(row, column, new QStandardItem());
+ }
+ }
+}
diff --git a/src/citra_qt/debugger/callstack.h b/src/citra_qt/debugger/callstack.h
index fb390f5c3..1a9b6dc81 100644
--- a/src/citra_qt/debugger/callstack.h
+++ b/src/citra_qt/debugger/callstack.h
@@ -21,4 +21,7 @@ public slots:
private:
Ui::CallStack ui;
QStandardItemModel* callstack_model;
+
+ /// Clears the callstack widget while keeping the column widths the same
+ void Clear();
};