summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/CheatSearch.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/Source/Core/Core/CheatSearch.cpp b/Source/Core/Core/CheatSearch.cpp
index 6ff7f6ceaf..8b488191f3 100644
--- a/Source/Core/Core/CheatSearch.cpp
+++ b/Source/Core/Core/CheatSearch.cpp
@@ -222,8 +222,7 @@ Cheats::NewSearch(const Core::CPUThreadGuard& guard,
return;
}
- auto& system = Core::System::GetInstance();
- auto& ppc_state = system.GetPPCState();
+ const auto& ppc_state = guard.GetSystem().GetPPCState();
if (address_space == PowerPC::RequestedAddressSpace::Virtual && !ppc_state.msr.DR)
{
error_code = Cheats::SearchErrorCode::VirtualAddressesCurrentlyNotAccessible;
@@ -288,8 +287,7 @@ Cheats::NextSearch(const Core::CPUThreadGuard& guard,
return;
}
- auto& system = Core::System::GetInstance();
- auto& ppc_state = system.GetPPCState();
+ const auto& ppc_state = guard.GetSystem().GetPPCState();
if (address_space == PowerPC::RequestedAddressSpace::Virtual && !ppc_state.msr.DR)
{
error_code = Cheats::SearchErrorCode::VirtualAddressesCurrentlyNotAccessible;