mirror of
https://github.com/yuzu-emu/yuzu-mainline.git
synced 2024-12-26 10:45:31 +00:00
Qt Callstack: Clear the callstack every time it's updated
This fixes the issue that old members of the callstack would stick around, even when the callstack shortened.
This commit is contained in:
parent
eacc2a501b
commit
d670b7e522
|
@ -33,6 +33,8 @@ void CallstackWidget::OnDebugModeEntered()
|
||||||
u32 sp = app_core->GetReg(13); //stack pointer
|
u32 sp = app_core->GetReg(13); //stack pointer
|
||||||
u32 ret_addr, call_addr, func_addr;
|
u32 ret_addr, call_addr, func_addr;
|
||||||
|
|
||||||
|
Clear();
|
||||||
|
|
||||||
int counter = 0;
|
int counter = 0;
|
||||||
for (u32 addr = 0x10000000; addr >= sp; addr -= 4)
|
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());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -21,4 +21,7 @@ public slots:
|
||||||
private:
|
private:
|
||||||
Ui::CallStack ui;
|
Ui::CallStack ui;
|
||||||
QStandardItemModel* callstack_model;
|
QStandardItemModel* callstack_model;
|
||||||
|
|
||||||
|
/// Clears the callstack widget while keeping the column widths the same
|
||||||
|
void Clear();
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue