From ffc0a5def4613eab0335f3bc82c630f88c7a000a Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Wed, 21 Oct 2020 22:01:33 +1000 Subject: [PATCH] Qt/CheatManager: Hook up address search range --- src/duckstation-qt/cheatmanagerdialog.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/duckstation-qt/cheatmanagerdialog.cpp b/src/duckstation-qt/cheatmanagerdialog.cpp index 3f5f42483..cefa7f981 100644 --- a/src/duckstation-qt/cheatmanagerdialog.cpp +++ b/src/duckstation-qt/cheatmanagerdialog.cpp @@ -76,6 +76,22 @@ void CheatManagerDialog::connectUi() }); connect(m_ui.scanOperator, QOverload::of(&QComboBox::currentIndexChanged), [this](int index) { m_scanner.SetOperator(static_cast(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(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(address)); + }); connect(m_ui.scanNewSearch, &QPushButton::clicked, [this]() { m_scanner.Search(); updateResults();