mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-23 05:10:10 +00:00
Fixed build errors and runtime errors in new gpu debugger menus.
This commit is contained in:
parent
85e8edbdd9
commit
fc191a3490
@ -17,6 +17,7 @@ GPUCommandListModel::GPUCommandListModel(QObject* parent) : QAbstractItemModel(p
|
||||
QModelIndex GPUCommandListModel::index(int row, int column, const QModelIndex& parent) const
|
||||
{
|
||||
TreeItem* item;
|
||||
TreeItem* internal;
|
||||
|
||||
if (!parent.isValid()) {
|
||||
item = root_item;
|
||||
@ -24,7 +25,13 @@ QModelIndex GPUCommandListModel::index(int row, int column, const QModelIndex& p
|
||||
item = (TreeItem*)parent.internalPointer();
|
||||
}
|
||||
|
||||
return createIndex(row, column, item->children[row]);
|
||||
if (item->children.size() <= row) {
|
||||
internal = item;
|
||||
}
|
||||
else { internal = item->children[row]; }
|
||||
|
||||
|
||||
return createIndex(row, column, internal);
|
||||
}
|
||||
|
||||
QModelIndex GPUCommandListModel::parent(const QModelIndex& child) const
|
||||
|
@ -20,9 +20,9 @@ public:
|
||||
// A vector of commands represented by their raw byte sequence
|
||||
struct PicaCommand : public std::vector<u32>
|
||||
{
|
||||
Pica::CommandHeader& GetHeader()
|
||||
Pica::CommandHeader& GetHeader() const
|
||||
{
|
||||
u32& val = at(1);
|
||||
const u32& val = at(1);
|
||||
return *(Pica::CommandHeader*)&val;
|
||||
}
|
||||
};
|
||||
@ -64,7 +64,7 @@ public:
|
||||
}
|
||||
|
||||
protected:
|
||||
GraphicsDebugger* GetDebugger()
|
||||
GraphicsDebugger* GetDebugger() const
|
||||
{
|
||||
return observed;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user