Qt: Cache CPU register values

That way they don't update while running.
This commit is contained in:
Stenzek
2024-02-27 22:38:02 +10:00
parent 4599109854
commit ef4389cea8
5 changed files with 13 additions and 11 deletions

View File

@@ -64,11 +64,12 @@ public:
virtual QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
void invalidateView();
void updateValues();
void saveCurrentValues();
private:
u32 m_old_reg_values[CPU::NUM_DEBUGGER_REGISTER_LIST_ENTRIES] = {};
std::array<u32 ,CPU::NUM_DEBUGGER_REGISTER_LIST_ENTRIES> m_reg_values = {};
std::array<u32, CPU::NUM_DEBUGGER_REGISTER_LIST_ENTRIES> m_old_reg_values = {};
};
class DebuggerStackModel : public QAbstractListModel