summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinQt/CheatsManager.cpp
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2024-07-02 17:27:04 +0200
committerJosJuice <josjuice@gmail.com>2024-10-04 18:35:41 +0200
commit6ca2da53e86766f54df1ae79e65bb220b41ed7ef (patch)
tree4b2fdcf42129d439d532b0cf31b94dfe748969c5 /Source/Core/DolphinQt/CheatsManager.cpp
parent2da3e49b1e876a28c93ad990c71e5d4bb2441f5b (diff)
Partially revert "Revert "Audit uses of IsRunning and GetState""
This reverts the revert commit bc67fc97c39628c76a4dbca411b0e8a9bfaf726a, except for the changes in BaseConfigLoader.cpp, which caused the bug that made us revert 72cf2bdb87f09deff22e1085de3290126aa4ad05. PR 12917 contains an improved change to BaseConfigLoader.cpp, which can be merged (or rejected) independently. A few changes have also been made based on review comments.
Diffstat (limited to 'Source/Core/DolphinQt/CheatsManager.cpp')
-rw-r--r--Source/Core/DolphinQt/CheatsManager.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/Core/DolphinQt/CheatsManager.cpp b/Source/Core/DolphinQt/CheatsManager.cpp
index cb17486d11..67e177cef6 100644
--- a/Source/Core/DolphinQt/CheatsManager.cpp
+++ b/Source/Core/DolphinQt/CheatsManager.cpp
@@ -102,8 +102,9 @@ void CheatsManager::RefreshCodeTabs(Core::State state)
if (state == Core::State::Starting || state == Core::State::Stopping)
return;
- const auto& game_id =
- state != Core::State::Uninitialized ? SConfig::GetInstance().GetGameID() : std::string();
+ const auto& game_id = state == Core::State::Running || state == Core::State::Paused ?
+ SConfig::GetInstance().GetGameID() :
+ std::string();
const auto& game_tdb_id = SConfig::GetInstance().GetGameTDBID();
const u16 revision = SConfig::GetInstance().GetRevision();