Core/IOS/ES: Remove global system accessor in InitializeEmulationState()
We can pass the core timing instance into the function.
This commit is contained in:
parent
251c7a1030
commit
f1b18d8ae3
|
@ -125,10 +125,8 @@ ESDevice::ESDevice(EmulationKernel& ios, ESCore& core, const std::string& device
|
||||||
|
|
||||||
ESDevice::~ESDevice() = default;
|
ESDevice::~ESDevice() = default;
|
||||||
|
|
||||||
void ESDevice::InitializeEmulationState()
|
void ESDevice::InitializeEmulationState(CoreTiming::CoreTimingManager& core_timing)
|
||||||
{
|
{
|
||||||
auto& system = Core::System::GetInstance();
|
|
||||||
auto& core_timing = system.GetCoreTiming();
|
|
||||||
s_finish_init_event =
|
s_finish_init_event =
|
||||||
core_timing.RegisterEvent("IOS-ESFinishInit", [](Core::System& system_, u64, s64) {
|
core_timing.RegisterEvent("IOS-ESFinishInit", [](Core::System& system_, u64, s64) {
|
||||||
GetIOS()->GetESDevice()->FinishInit();
|
GetIOS()->GetESDevice()->FinishInit();
|
||||||
|
|
|
@ -17,6 +17,10 @@
|
||||||
|
|
||||||
class PointerWrap;
|
class PointerWrap;
|
||||||
|
|
||||||
|
namespace CoreTiming
|
||||||
|
{
|
||||||
|
class CoreTimingManager;
|
||||||
|
}
|
||||||
namespace DiscIO
|
namespace DiscIO
|
||||||
{
|
{
|
||||||
enum class Platform;
|
enum class Platform;
|
||||||
|
@ -232,7 +236,7 @@ public:
|
||||||
ESDevice& operator=(ESDevice&& other) = delete;
|
ESDevice& operator=(ESDevice&& other) = delete;
|
||||||
~ESDevice();
|
~ESDevice();
|
||||||
|
|
||||||
static void InitializeEmulationState();
|
static void InitializeEmulationState(CoreTiming::CoreTimingManager& core_timing);
|
||||||
static void FinalizeEmulationState();
|
static void FinalizeEmulationState();
|
||||||
|
|
||||||
ReturnCode DIVerify(const ES::TMDReader& tmd, const ES::TicketReader& ticket);
|
ReturnCode DIVerify(const ES::TMDReader& tmd, const ES::TicketReader& ticket);
|
||||||
|
|
|
@ -959,7 +959,7 @@ void Init(Core::System& system)
|
||||||
s_ios->HandleIPCEvent(userdata);
|
s_ios->HandleIPCEvent(userdata);
|
||||||
});
|
});
|
||||||
|
|
||||||
ESDevice::InitializeEmulationState();
|
ESDevice::InitializeEmulationState(core_timing);
|
||||||
|
|
||||||
s_event_finish_ppc_bootstrap =
|
s_event_finish_ppc_bootstrap =
|
||||||
core_timing.RegisterEvent("IOSFinishPPCBootstrap", FinishPPCBootstrap);
|
core_timing.RegisterEvent("IOSFinishPPCBootstrap", FinishPPCBootstrap);
|
||||||
|
|
Loading…
Reference in New Issue