mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2025-01-18 22:35:39 +00:00
Qt/CheatManager: Hook up address search range
This commit is contained in:
parent
2fb611518d
commit
ffc0a5def4
|
@ -76,6 +76,22 @@ void CheatManagerDialog::connectUi()
|
|||
});
|
||||
connect(m_ui.scanOperator, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
[this](int index) { m_scanner.SetOperator(static_cast<MemoryScan::Operator>(index)); });
|
||||
connect(m_ui.scanStartAddress, &QLineEdit::textChanged, [this](const QString& value) {
|
||||
uint address;
|
||||
if (value.startsWith(QStringLiteral("0x")) && value.length() > 2)
|
||||
address = value.mid(2).toUInt(nullptr, 16);
|
||||
else
|
||||
address = value.toUInt(nullptr, 16);
|
||||
m_scanner.SetStartAddress(static_cast<PhysicalMemoryAddress>(address));
|
||||
});
|
||||
connect(m_ui.scanEndAddress, &QLineEdit::textChanged, [this](const QString& value) {
|
||||
uint address;
|
||||
if (value.startsWith(QStringLiteral("0x")) && value.length() > 2)
|
||||
address = value.mid(2).toUInt(nullptr, 16);
|
||||
else
|
||||
address = value.toUInt(nullptr, 16);
|
||||
m_scanner.SetEndAddress(static_cast<PhysicalMemoryAddress>(address));
|
||||
});
|
||||
connect(m_ui.scanNewSearch, &QPushButton::clicked, [this]() {
|
||||
m_scanner.Search();
|
||||
updateResults();
|
||||
|
|
Loading…
Reference in a new issue