Core/IOS/IOS: Remove global system accessor from Init()

Removes the final global system accessor from the main IOS code by
passing the system instance through it.
This commit is contained in:
Lioncache 2023-12-18 12:28:18 -05:00
parent 1f50a2fd5b
commit e6db08e03a
4 changed files with 4 additions and 5 deletions

View File

@ -57,7 +57,7 @@ void Init(Core::System& system, const Sram* override_sram)
if (SConfig::GetInstance().bWii)
{
IOS::Init();
IOS::HLE::Init(); // Depends on Memory
IOS::HLE::Init(system); // Depends on Memory
}
}

View File

@ -120,7 +120,7 @@ private:
};
friend class ::CBoot;
friend void ::IOS::HLE::Init();
friend void ::IOS::HLE::Init(Core::System&);
void ProcessQueuedIOCtl();
std::optional<DIResult> StartIOCtl(const IOCtlRequest& request);

View File

@ -949,9 +949,8 @@ static void FinishPPCBootstrap(Core::System& system, u64 userdata, s64 cycles_la
INFO_LOG_FMT(IOS, "Bootstrapping done.");
}
void Init()
void Init(Core::System& system)
{
auto& system = Core::System::GetInstance();
auto& core_timing = system.GetCoreTiming();
s_event_enqueue =

View File

@ -216,7 +216,7 @@ private:
};
// Used for controlling and accessing an IOS instance that is tied to emulation.
void Init();
void Init(Core::System& system);
void Shutdown();
EmulationKernel* GetIOS();