Add 2 step mode for display list : Go to selected line and go to next draw using selected texture

This commit is contained in:
Xele02 committed 2013-02-17 21:43:44 +01:00
1 parent 6339c2fc9a
commit 0fefca672d
7 files changed
+88 -8

No files matched your search

+47
View File
@@ -2,6 +2,7 @@
#include <QTimer>
#include <set>
#include <QMenu>
#include "Core/CPU.h"
#include "ui_debugger_displaylist.h"
@@ -1518,3 +1519,49 @@ void Debugger_DisplayList::on_indexList_itemClicked(QTreeWidgetItem *item, int c
{
UpdateIndexInfo();
}
void Debugger_DisplayList::on_displayListData_customContextMenuRequested(const QPoint &pos)
{
QTreeWidgetItem* item = ui->displayListData->itemAt(pos);
if(!item)
return;
displayListDataSelected = item;
QMenu menu(this);
QAction *runToHere = new QAction(tr("Run to here"), this);
connect(runToHere, SIGNAL(triggered()), this, SLOT(RunToDLPC()));
menu.addAction(runToHere);
menu.exec( ui->displayListData->mapToGlobal(pos));
}
void Debugger_DisplayList::RunToDLPC()
{
u32 addr = displayListDataSelected->text(0).toInt(0,16);
host->SetGPUStep(true, 2, addr);
host->NextGPUStep();
}
void Debugger_DisplayList::on_texturesList_customContextMenuRequested(const QPoint &pos)
{
QTreeWidgetItem* item = ui->texturesList->itemAt(pos);
if(!item)
return;
textureDataSelected = item;
QMenu menu(this);
QAction *runToDraw = new QAction(tr("Run to draw using this texture"), this);
connect(runToDraw, SIGNAL(triggered()), this, SLOT(RunToDrawTex()));
menu.addAction(runToDraw);
menu.exec( ui->texturesList->mapToGlobal(pos));
}
void Debugger_DisplayList::RunToDrawTex()
{
u32 addr = textureDataSelected->text(0).toInt(0,16);
host->SetGPUStep(true, 3, addr);
host->NextGPUStep();
}