diff options
| author | Admiral H. Curtiss <pikachu025@gmail.com> | 2021-10-28 01:59:52 +0200 |
|---|---|---|
| committer | Admiral H. Curtiss <pikachu025@gmail.com> | 2021-10-28 01:59:52 +0200 |
| commit | b3e17d2772b6ea2d1c6afef73f3d857cc2faf795 (patch) | |
| tree | 47cbe13ee6229eb6226822cc93846c416bf7327a /Source | |
| parent | d6ad3fbcb51a9916edd80ecbcb01f95b71cfb51d (diff) | |
Qt/CheatSearchFactoryWidget: Refuse to start standard memory region searches when no game is running because the memory size and console type may not be accurate.
Diffstat (limited to 'Source')
| -rw-r--r-- | Source/Core/DolphinQt/CheatSearchFactoryWidget.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/Core/DolphinQt/CheatSearchFactoryWidget.cpp b/Source/Core/DolphinQt/CheatSearchFactoryWidget.cpp index 4e0f8f2f1b..6e566600f8 100644 --- a/Source/Core/DolphinQt/CheatSearchFactoryWidget.cpp +++ b/Source/Core/DolphinQt/CheatSearchFactoryWidget.cpp @@ -20,8 +20,10 @@ #include "Core/CheatSearch.h" #include "Core/Config/MainSettings.h" #include "Core/ConfigManager.h" +#include "Core/Core.h" #include "Core/HW/Memmap.h" #include "Core/PowerPC/MMU.h" +#include "DolphinQt/QtUtils/ModalMessageBox.h" CheatSearchFactoryWidget::CheatSearchFactoryWidget() { @@ -152,6 +154,15 @@ void CheatSearchFactoryWidget::OnNewSearchClicked() PowerPC::RequestedAddressSpace address_space; if (m_standard_address_space->isChecked()) { + const Core::State core_state = Core::GetState(); + if (core_state != Core::State::Running && core_state != Core::State::Paused) + { + ModalMessageBox::warning( + this, tr("No game running."), + tr("Please start a game before starting a search with standard memory regions.")); + return; + } + memory_ranges.emplace_back(0x80000000, Memory::GetRamSizeReal()); if (SConfig::GetInstance().bWii) memory_ranges.emplace_back(0x90000000, Memory::GetExRamSizeReal()); |
