mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-08 21:53:31 +01:00
CheatSearch: Avoid ppcState global.
This commit is contained in:
parent
bbdfb4bc14
commit
bfc951311f
@ -20,6 +20,7 @@
|
|||||||
#include "Core/HW/Memmap.h"
|
#include "Core/HW/Memmap.h"
|
||||||
#include "Core/PowerPC/MMU.h"
|
#include "Core/PowerPC/MMU.h"
|
||||||
#include "Core/PowerPC/PowerPC.h"
|
#include "Core/PowerPC/PowerPC.h"
|
||||||
|
#include "Core/System.h"
|
||||||
|
|
||||||
Cheats::DataType Cheats::GetDataType(const Cheats::SearchValue& value)
|
Cheats::DataType Cheats::GetDataType(const Cheats::SearchValue& value)
|
||||||
{
|
{
|
||||||
@ -204,7 +205,9 @@ Cheats::NewSearch(const std::vector<Cheats::MemoryRange>& memory_ranges,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (address_space == PowerPC::RequestedAddressSpace::Virtual && !PowerPC::ppcState.msr.DR)
|
auto& system = Core::System::GetInstance();
|
||||||
|
auto& ppc_state = system.GetPPCState();
|
||||||
|
if (address_space == PowerPC::RequestedAddressSpace::Virtual && !ppc_state.msr.DR)
|
||||||
{
|
{
|
||||||
error_code = Cheats::SearchErrorCode::VirtualAddressesCurrentlyNotAccessible;
|
error_code = Cheats::SearchErrorCode::VirtualAddressesCurrentlyNotAccessible;
|
||||||
return;
|
return;
|
||||||
@ -263,7 +266,9 @@ Cheats::NextSearch(const std::vector<Cheats::SearchResult<T>>& previous_results,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (address_space == PowerPC::RequestedAddressSpace::Virtual && !PowerPC::ppcState.msr.DR)
|
auto& system = Core::System::GetInstance();
|
||||||
|
auto& ppc_state = system.GetPPCState();
|
||||||
|
if (address_space == PowerPC::RequestedAddressSpace::Virtual && !ppc_state.msr.DR)
|
||||||
{
|
{
|
||||||
error_code = Cheats::SearchErrorCode::VirtualAddressesCurrentlyNotAccessible;
|
error_code = Cheats::SearchErrorCode::VirtualAddressesCurrentlyNotAccessible;
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user