diff options
| author | OatmealDome <OatmealDome@users.noreply.github.com> | 2023-12-18 20:10:48 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-18 20:10:48 -0500 |
| commit | 186b2f4e92c62fe67230cece4bbdf18b800853ab (patch) | |
| tree | 434e25ff192b5dcfa3912d18125f7610c6f0831f /Source | |
| parent | 475c142e22365fa391f30a494081fa14e49dfb15 (diff) | |
| parent | dec53848f55fd6b32d4323db4a7ef78e7dc52b7f (diff) | |
Merge pull request #12450 from lioncash/cheats
CheatSearch: Get rid of global system accessors
Diffstat (limited to 'Source')
| -rw-r--r-- | Source/Core/Core/CheatSearch.cpp | 6 |
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; |
