mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-26 23:55:40 +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;
|
||||
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);
|
||||
|
||||
QTableWidgetItem* address_item = new QTableWidgetItem(formatHexValue(res.address));
|
||||
|
@ -706,6 +715,8 @@ void CheatManagerDialog::updateResultsValues()
|
|||
}
|
||||
|
||||
row++;
|
||||
if (row == MAX_DISPLAYED_SCAN_RESULTS)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -49,6 +49,11 @@ private Q_SLOTS:
|
|||
void updateScanUi();
|
||||
|
||||
private:
|
||||
enum : int
|
||||
{
|
||||
MAX_DISPLAYED_SCAN_RESULTS = 5000
|
||||
};
|
||||
|
||||
void setupAdditionalUi();
|
||||
void connectUi();
|
||||
void setUpdateTimerEnabled(bool enabled);
|
||||
|
|
Loading…
Reference in a new issue