mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-30 01:25:51 +00:00
Qt/CheatManager: Only display first 5000 search results
This commit is contained in:
parent
2f5cf91d11
commit
a83439fd35
|
@ -670,6 +670,15 @@ void CheatManagerDialog::updateResults()
|
||||||
int row = 0;
|
int row = 0;
|
||||||
for (const MemoryScan::Result& res : m_scanner.GetResults())
|
for (const MemoryScan::Result& res : m_scanner.GetResults())
|
||||||
{
|
{
|
||||||
|
if (row == MAX_DISPLAYED_SCAN_RESULTS)
|
||||||
|
{
|
||||||
|
QMessageBox::information(this, tr("Memory Scan"),
|
||||||
|
tr("Memory scan found %1 addresses, but only the first %2 are displayed.")
|
||||||
|
.arg(m_scanner.GetResultCount())
|
||||||
|
.arg(MAX_DISPLAYED_SCAN_RESULTS));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
m_ui.scanTable->insertRow(row);
|
m_ui.scanTable->insertRow(row);
|
||||||
|
|
||||||
QTableWidgetItem* address_item = new QTableWidgetItem(formatHexValue(res.address));
|
QTableWidgetItem* address_item = new QTableWidgetItem(formatHexValue(res.address));
|
||||||
|
@ -706,6 +715,8 @@ void CheatManagerDialog::updateResultsValues()
|
||||||
}
|
}
|
||||||
|
|
||||||
row++;
|
row++;
|
||||||
|
if (row == MAX_DISPLAYED_SCAN_RESULTS)
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -49,6 +49,11 @@ private Q_SLOTS:
|
||||||
void updateScanUi();
|
void updateScanUi();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
enum : int
|
||||||
|
{
|
||||||
|
MAX_DISPLAYED_SCAN_RESULTS = 5000
|
||||||
|
};
|
||||||
|
|
||||||
void setupAdditionalUi();
|
void setupAdditionalUi();
|
||||||
void connectUi();
|
void connectUi();
|
||||||
void setUpdateTimerEnabled(bool enabled);
|
void setUpdateTimerEnabled(bool enabled);
|
||||||
|
|
Loading…
Reference in a new issue