diff --git a/Source/Core/Core/Boot/Boot.cpp b/Source/Core/Core/Boot/Boot.cpp index 4399d1d5e5..ef87f3c396 100644 --- a/Source/Core/Core/Boot/Boot.cpp +++ b/Source/Core/Core/Boot/Boot.cpp @@ -573,7 +573,7 @@ bool CBoot::BootUp(Core::System& system, const Core::CPUThreadGuard& guard, // Because there is no TMD to get the requested system (IOS) version from, // we default to IOS58, which is the version used by the Homebrew Channel. SetupWiiMemory(system, IOS::HLE::IOSC::ConsoleType::Retail); - IOS::HLE::GetIOS()->BootIOS(Titles::IOS(58)); + system.GetIOS()->BootIOS(Titles::IOS(58)); } else { @@ -701,7 +701,7 @@ void UpdateStateFlags(std::function update_function) { CreateSystemMenuTitleDirs(); const std::string file_path = Common::GetTitleDataPath(Titles::SYSTEM_MENU) + "/" WII_STATE; - const auto fs = IOS::HLE::GetIOS()->GetFS(); + const auto fs = Core::System::GetInstance().GetIOS()->GetFS(); constexpr IOS::HLE::FS::Mode rw_mode = IOS::HLE::FS::Mode::ReadWrite; const auto file = fs->CreateAndOpenFile(IOS::SYSMENU_UID, IOS::SYSMENU_GID, file_path, {rw_mode, rw_mode, rw_mode}); @@ -721,7 +721,7 @@ void UpdateStateFlags(std::function update_function) void CreateSystemMenuTitleDirs() { - const auto& es = IOS::HLE::GetIOS()->GetESCore(); + const auto& es = Core::System::GetInstance().GetIOS()->GetESCore(); es.CreateTitleDirectories(Titles::SYSTEM_MENU, IOS::SYSMENU_GID); } diff --git a/Source/Core/Core/Boot/Boot_BS2Emu.cpp b/Source/Core/Core/Boot/Boot_BS2Emu.cpp index 1e1f9d993b..09f9e5128a 100644 --- a/Source/Core/Core/Boot/Boot_BS2Emu.cpp +++ b/Source/Core/Core/Boot/Boot_BS2Emu.cpp @@ -362,7 +362,7 @@ bool CBoot::SetupWiiMemory(Core::System& system, IOS::HLE::IOSC::ConsoleType con const std::string settings_file_path(Common::GetTitleDataPath(Titles::SYSTEM_MENU) + "/" WII_SETTING); - const auto fs = IOS::HLE::GetIOS()->GetFS(); + const auto fs = system.GetIOS()->GetFS(); { Common::SettingsHandler::Buffer data; const auto file = fs->OpenFile(IOS::SYSMENU_UID, IOS::SYSMENU_GID, settings_file_path, @@ -502,7 +502,7 @@ static void WriteEmptyPlayRecord() { CreateSystemMenuTitleDirs(); const std::string file_path = Common::GetTitleDataPath(Titles::SYSTEM_MENU) + "/play_rec.dat"; - const auto fs = IOS::HLE::GetIOS()->GetFS(); + const auto fs = Core::System::GetInstance().GetIOS()->GetFS(); constexpr IOS::HLE::FS::Mode rw_mode = IOS::HLE::FS::Mode::ReadWrite; const auto playrec_file = fs->CreateAndOpenFile(IOS::SYSMENU_UID, IOS::SYSMENU_GID, file_path, {rw_mode, rw_mode, rw_mode}); @@ -559,11 +559,11 @@ bool CBoot::EmulatedBS2_Wii(Core::System& system, const Core::CPUThreadGuard& gu const u64 ios = ios_override >= 0 ? Titles::IOS(static_cast(ios_override)) : tmd.GetIOSId(); const auto console_type = volume.GetTicket(data_partition).GetConsoleType(); - if (!SetupWiiMemory(system, console_type) || !IOS::HLE::GetIOS()->BootIOS(ios)) + if (!SetupWiiMemory(system, console_type) || !system.GetIOS()->BootIOS(ios)) return false; auto di = - std::static_pointer_cast(IOS::HLE::GetIOS()->GetDeviceByName("/dev/di")); + std::static_pointer_cast(system.GetIOS()->GetDeviceByName("/dev/di")); di->InitializeIfFirstTime(); di->ChangePartition(data_partition); @@ -596,7 +596,7 @@ bool CBoot::EmulatedBS2_Wii(Core::System& system, const Core::CPUThreadGuard& gu // Warning: This call will set incorrect running game metadata if our volume parameter // doesn't point to the same disc as the one that's inserted in the emulated disc drive! - IOS::HLE::GetIOS()->GetESDevice()->DIVerify(tmd, volume.GetTicket(partition)); + system.GetIOS()->GetESDevice()->DIVerify(tmd, volume.GetTicket(partition)); return true; } diff --git a/Source/Core/Core/Boot/Boot_WiiWAD.cpp b/Source/Core/Core/Boot/Boot_WiiWAD.cpp index 848fcedbf8..8b3d780335 100644 --- a/Source/Core/Core/Boot/Boot_WiiWAD.cpp +++ b/Source/Core/Core/Boot/Boot_WiiWAD.cpp @@ -12,6 +12,7 @@ #include "Core/IOS/ES/Formats.h" #include "Core/IOS/IOS.h" #include "Core/IOS/IOSC.h" +#include "Core/System.h" #include "Core/WiiUtils.h" #include "DiscIO/VolumeWad.h" @@ -21,7 +22,7 @@ bool CBoot::BootNANDTitle(Core::System& system, const u64 title_id) state->type = 0x04; // TYPE_NANDBOOT }); - auto es = IOS::HLE::GetIOS()->GetESDevice(); + auto es = system.GetIOS()->GetESDevice(); const IOS::ES::TicketReader ticket = es->GetCore().FindSignedTicket(title_id); auto console_type = IOS::HLE::IOSC::ConsoleType::Retail; if (ticket.IsValid()) @@ -34,7 +35,7 @@ bool CBoot::BootNANDTitle(Core::System& system, const u64 title_id) bool CBoot::Boot_WiiWAD(Core::System& system, const DiscIO::VolumeWAD& wad) { - if (!WiiUtils::InstallWAD(*IOS::HLE::GetIOS(), wad, WiiUtils::InstallType::Temporary)) + if (!WiiUtils::InstallWAD(*system.GetIOS(), wad, WiiUtils::InstallType::Temporary)) { PanicAlertFmtT("Cannot boot this WAD because it could not be installed to the NAND."); return false; diff --git a/Source/Core/Core/Core.cpp b/Source/Core/Core/Core.cpp index 4fd75d056f..ce23f41fb5 100644 --- a/Source/Core/Core/Core.cpp +++ b/Source/Core/Core/Core.cpp @@ -1016,7 +1016,7 @@ void UpdateWantDeterminism(bool initial) RunAsCPUThread([&] { s_wants_determinism = new_want_determinism; - const auto ios = IOS::HLE::GetIOS(); + const auto ios = system.GetIOS(); if (ios) ios->UpdateWantDeterminism(new_want_determinism); diff --git a/Source/Core/Core/HW/HW.cpp b/Source/Core/Core/HW/HW.cpp index 61702e45c5..20aed37a17 100644 --- a/Source/Core/Core/HW/HW.cpp +++ b/Source/Core/Core/HW/HW.cpp @@ -63,7 +63,7 @@ void Init(Core::System& system, const Sram* override_sram) void Shutdown(Core::System& system) { // IOS should always be shut down regardless of IsWii because it can be running in GC mode (MIOS). - IOS::HLE::Shutdown(); // Depends on Memory + IOS::HLE::Shutdown(system); // Depends on Memory system.GetWiiIPC().Shutdown(); system.GetSystemTimers().Shutdown(); @@ -111,7 +111,7 @@ void DoState(Core::System& system, PointerWrap& p) { system.GetWiiIPC().DoState(p); p.DoMarker("IOS"); - IOS::HLE::GetIOS()->DoState(p); + system.GetIOS()->DoState(p); p.DoMarker("IOS::HLE"); } diff --git a/Source/Core/Core/HW/ProcessorInterface.cpp b/Source/Core/Core/HW/ProcessorInterface.cpp index 9bd8a4be88..679f5d4092 100644 --- a/Source/Core/Core/HW/ProcessorInterface.cpp +++ b/Source/Core/Core/HW/ProcessorInterface.cpp @@ -232,7 +232,7 @@ void ProcessorInterfaceManager::ToggleResetButtonCallback(Core::System& system, void ProcessorInterfaceManager::IOSNotifyResetButtonCallback(Core::System& system, u64 userdata, s64 cyclesLate) { - const auto ios = IOS::HLE::GetIOS(); + const auto ios = system.GetIOS(); if (!ios) return; @@ -244,7 +244,7 @@ void ProcessorInterfaceManager::IOSNotifyResetButtonCallback(Core::System& syste void ProcessorInterfaceManager::IOSNotifyPowerButtonCallback(Core::System& system, u64 userdata, s64 cyclesLate) { - const auto ios = IOS::HLE::GetIOS(); + const auto ios = system.GetIOS(); if (!ios) return; diff --git a/Source/Core/Core/HW/SystemTimers.cpp b/Source/Core/Core/HW/SystemTimers.cpp index 47c2b064a1..022b94bf4d 100644 --- a/Source/Core/Core/HW/SystemTimers.cpp +++ b/Source/Core/Core/HW/SystemTimers.cpp @@ -103,7 +103,7 @@ void SystemTimersManager::IPC_HLE_UpdateCallback(Core::System& system, u64 userd { if (system.IsWii()) { - IOS::HLE::GetIOS()->UpdateDevices(); + system.GetIOS()->UpdateDevices(); auto& system_timers = system.GetSystemTimers(); system.GetCoreTiming().ScheduleEvent(system_timers.m_ipc_hle_period - cycles_late, system_timers.m_event_type_ipc_hle); diff --git a/Source/Core/Core/HW/WII_IPC.cpp b/Source/Core/Core/HW/WII_IPC.cpp index e8db89ff38..b3c7289a87 100644 --- a/Source/Core/Core/HW/WII_IPC.cpp +++ b/Source/Core/Core/HW/WII_IPC.cpp @@ -140,8 +140,8 @@ void WiiIPC::RegisterMMIO(MMIO::Mapping* mmio, u32 base) if ((val >> 2 & 1 && wii_ipc.m_ctrl.IY1) || (val >> 1 & 1 && wii_ipc.m_ctrl.IY2)) wii_ipc.m_ppc_irq_flags |= INT_CAUSE_IPC_BROADWAY; if (wii_ipc.m_ctrl.X1) - HLE::GetIOS()->EnqueueIPCRequest(wii_ipc.m_ppc_msg); - HLE::GetIOS()->UpdateIPC(); + system.GetIOS()->EnqueueIPCRequest(wii_ipc.m_ppc_msg); + system.GetIOS()->UpdateIPC(); system.GetCoreTiming().ScheduleEvent(0, wii_ipc.m_event_type_update_interrupts, 0); })); @@ -152,7 +152,7 @@ void WiiIPC::RegisterMMIO(MMIO::Mapping* mmio, u32 base) MMIO::ComplexWrite([](Core::System& system, u32, u32 val) { auto& wii_ipc = system.GetWiiIPC(); wii_ipc.m_ppc_irq_flags &= ~val; - HLE::GetIOS()->UpdateIPC(); + system.GetIOS()->UpdateIPC(); system.GetCoreTiming().ScheduleEvent(0, wii_ipc.m_event_type_update_interrupts, 0); })); @@ -163,7 +163,7 @@ void WiiIPC::RegisterMMIO(MMIO::Mapping* mmio, u32 base) wii_ipc.m_ppc_irq_masks = val; if (wii_ipc.m_ppc_irq_masks & INT_CAUSE_IPC_BROADWAY) // wtf? wii_ipc.Reset(); - HLE::GetIOS()->UpdateIPC(); + system.GetIOS()->UpdateIPC(); system.GetCoreTiming().ScheduleEvent(0, wii_ipc.m_event_type_update_interrupts, 0); })); diff --git a/Source/Core/Core/IOS/DI/DI.cpp b/Source/Core/Core/IOS/DI/DI.cpp index 3d8f228b02..0f1413229f 100644 --- a/Source/Core/Core/IOS/DI/DI.cpp +++ b/Source/Core/Core/IOS/DI/DI.cpp @@ -602,7 +602,7 @@ std::optional DIDevice::StartImmediateTransfer(const IOCtlRe static std::shared_ptr GetDevice() { - auto ios = GetIOS(); + auto ios = Core::System::GetInstance().GetIOS(); if (!ios) return nullptr; auto di = ios->GetDeviceByName("/dev/di"); diff --git a/Source/Core/Core/IOS/Device.cpp b/Source/Core/Core/IOS/Device.cpp index ded8e04224..d826f981a6 100644 --- a/Source/Core/Core/IOS/Device.cpp +++ b/Source/Core/Core/IOS/Device.cpp @@ -28,7 +28,7 @@ OpenRequest::OpenRequest(Core::System& system, const u32 address_) : Request(sys auto& memory = system.GetMemory(); path = memory.GetString(memory.Read_U32(address + 0xc)); flags = static_cast(memory.Read_U32(address + 0x10)); - const EmulationKernel* ios = GetIOS(); + const EmulationKernel* ios = system.GetIOS(); if (ios) { uid = ios->GetUidForPPC(); diff --git a/Source/Core/Core/IOS/ES/ES.cpp b/Source/Core/Core/IOS/ES/ES.cpp index fa063df947..42513ecd8b 100644 --- a/Source/Core/Core/IOS/ES/ES.cpp +++ b/Source/Core/Core/IOS/ES/ES.cpp @@ -131,15 +131,15 @@ void ESDevice::InitializeEmulationState(CoreTiming::CoreTimingManager& core_timi { s_finish_init_event = core_timing.RegisterEvent("IOS-ESFinishInit", [](Core::System& system_, u64, s64) { - GetIOS()->GetESDevice()->FinishInit(); + system_.GetIOS()->GetESDevice()->FinishInit(); }); s_reload_ios_for_ppc_launch_event = core_timing.RegisterEvent( "IOS-ESReloadIOSForPPCLaunch", [](Core::System& system_, u64 ios_id, s64) { - GetIOS()->GetESDevice()->LaunchTitle(ios_id, HangPPC::Yes); + system_.GetIOS()->GetESDevice()->LaunchTitle(ios_id, HangPPC::Yes); }); s_bootstrap_ppc_for_launch_event = core_timing.RegisterEvent("IOS-ESBootstrapPPCForLaunch", [](Core::System& system_, u64, s64) { - GetIOS()->GetESDevice()->BootstrapPPC(); + system_.GetIOS()->GetESDevice()->BootstrapPPC(); }); } diff --git a/Source/Core/Core/IOS/IOS.cpp b/Source/Core/Core/IOS/IOS.cpp index 12e2df0384..2f96cc99bb 100644 --- a/Source/Core/Core/IOS/IOS.cpp +++ b/Source/Core/Core/IOS/IOS.cpp @@ -64,8 +64,6 @@ namespace IOS::HLE { -static std::unique_ptr s_ios; - constexpr u64 ENQUEUE_REQUEST_FLAG = 0x100000000ULL; static CoreTiming::EventType* s_event_enqueue; static CoreTiming::EventType* s_event_finish_ppc_bootstrap; @@ -284,7 +282,7 @@ Kernel::Kernel(IOSC::ConsoleType console_type) : m_iosc(console_type) { // Until the Wii root and NAND path stuff is entirely managed by IOS and made non-static, // using more than one IOS instance at a time is not supported. - ASSERT(GetIOS() == nullptr); + ASSERT(Core::System::GetInstance().GetIOS() == nullptr); m_is_responsible_for_nand_root = !Core::WiiRootIsInitialized(); if (m_is_responsible_for_nand_root) @@ -477,8 +475,8 @@ private: static void FinishIOSBoot(Core::System& system, u64 ios_title_id) { // Shut down the active IOS first before switching to the new one. - s_ios.reset(); - s_ios = std::make_unique(system, ios_title_id); + system.SetIOS(nullptr); + system.SetIOS(std::make_unique(system, ios_title_id)); } static constexpr SystemTimers::TimeBaseTick GetIOSBootTicks(u32 version) @@ -959,8 +957,9 @@ void Init(Core::System& system) s_event_enqueue = core_timing.RegisterEvent("IPCEvent", [](Core::System& system_, u64 userdata, s64) { - if (s_ios) - s_ios->HandleIPCEvent(userdata); + auto* ios = system_.GetIOS(); + if (ios) + ios->HandleIPCEvent(userdata); }); ESDevice::InitializeEmulationState(core_timing); @@ -976,7 +975,7 @@ void Init(Core::System& system) core_timing.RegisterEvent("FinishDICommand", DIDevice::FinishDICommandCallback); // Start with IOS80 to simulate part of the Wii boot process. - s_ios = std::make_unique(system, Titles::SYSTEM_MENU_IOS); + system.SetIOS(std::make_unique(system, Titles::SYSTEM_MENU_IOS)); // On a Wii, boot2 launches the system menu IOS, which then launches the system menu // (which bootstraps the PPC). Bootstrapping the PPC results in memory values being set up. // This means that the constants in the 0x3100 region are always set up by the time @@ -985,17 +984,12 @@ void Init(Core::System& system) SetupMemory(system.GetMemory(), Titles::SYSTEM_MENU_IOS, MemorySetupType::Full); } -void Shutdown() +void Shutdown(Core::System& system) { - s_ios.reset(); + system.SetIOS(nullptr); ESDevice::FinalizeEmulationState(); } -EmulationKernel* GetIOS() -{ - return s_ios.get(); -} - // Based on a hardware test, a device takes at least ~2700 ticks to reply to an IPC request. // Depending on how much work a command performs, this can take much longer (10000+) // especially if the NAND filesystem is accessed. diff --git a/Source/Core/Core/IOS/IOS.h b/Source/Core/Core/IOS/IOS.h index 148be1e850..2f8fe04017 100644 --- a/Source/Core/Core/IOS/IOS.h +++ b/Source/Core/Core/IOS/IOS.h @@ -217,7 +217,6 @@ private: // Used for controlling and accessing an IOS instance that is tied to emulation. void Init(Core::System& system); -void Shutdown(); -EmulationKernel* GetIOS(); +void Shutdown(Core::System& system); } // namespace IOS::HLE diff --git a/Source/Core/Core/System.cpp b/Source/Core/Core/System.cpp index 8dbffa3abb..9c97e6febe 100644 --- a/Source/Core/Core/System.cpp +++ b/Source/Core/Core/System.cpp @@ -61,6 +61,8 @@ struct System::Impl bool m_sound_stream_running = false; bool m_audio_dump_started = false; + std::unique_ptr m_ios; + AudioInterface::AudioInterfaceManager m_audio_interface; CoreTiming::CoreTimingManager m_core_timing; CommandProcessor::CommandProcessorManager m_command_processor; @@ -140,6 +142,16 @@ void System::SetAudioDumpStarted(bool started) m_impl->m_audio_dump_started = started; } +IOS::HLE::EmulationKernel* System::GetIOS() const +{ + return m_impl->m_ios.get(); +} + +void System::SetIOS(std::unique_ptr ios) +{ + m_impl->m_ios = std::move(ios); +} + AudioInterface::AudioInterfaceManager& System::GetAudioInterface() const { return m_impl->m_audio_interface; diff --git a/Source/Core/Core/System.h b/Source/Core/Core/System.h index 2867f7a332..fe60eabf12 100644 --- a/Source/Core/Core/System.h +++ b/Source/Core/Core/System.h @@ -53,6 +53,10 @@ namespace GPFifo { class GPFifoManager; } +namespace IOS::HLE +{ +class EmulationKernel; +} namespace HSP { class HSPManager; @@ -148,6 +152,9 @@ public: bool IsAudioDumpStarted() const; void SetAudioDumpStarted(bool started); + IOS::HLE::EmulationKernel* GetIOS() const; + void SetIOS(std::unique_ptr ios); + AudioInterface::AudioInterfaceManager& GetAudioInterface() const; CPU::CPUManager& GetCPU() const; CoreTiming::CoreTimingManager& GetCoreTiming() const; diff --git a/Source/Core/Core/WiiRoot.cpp b/Source/Core/Core/WiiRoot.cpp index a6486d3fa5..9fae6a467b 100644 --- a/Source/Core/Core/WiiRoot.cpp +++ b/Source/Core/Core/WiiRoot.cpp @@ -321,7 +321,7 @@ void InitializeWiiFileSystemContents( std::optional save_redirect, const BootSessionData& boot_session_data) { - const auto fs = IOS::HLE::GetIOS()->GetFS(); + const auto fs = Core::System::GetInstance().GetIOS()->GetFS(); // Some games (such as Mario Kart Wii) assume that NWC24 files will always be present // even upon the first launch as they are normally created by the system menu. @@ -397,7 +397,7 @@ void CleanUpWiiFileSystemContents(const BootSessionData& boot_session_data) File::MoveWithOverwrite(redirect.temp_path, redirect.real_path); } - IOS::HLE::EmulationKernel* ios = IOS::HLE::GetIOS(); + IOS::HLE::EmulationKernel* ios = Core::System::GetInstance().GetIOS(); // clear the redirects in the session FS, otherwise the back-copy might grab redirected files s_nand_redirects.clear(); diff --git a/Source/Core/Core/WiiUtils.cpp b/Source/Core/Core/WiiUtils.cpp index 92c2c19a0d..2803844ac6 100644 --- a/Source/Core/Core/WiiUtils.cpp +++ b/Source/Core/Core/WiiUtils.cpp @@ -40,6 +40,7 @@ #include "Core/IOS/USB/Bluetooth/BTReal.h" #include "Core/IOS/Uids.h" #include "Core/SysConf.h" +#include "Core/System.h" #include "DiscIO/DiscExtractor.h" #include "DiscIO/Enums.h" #include "DiscIO/Filesystem.h" @@ -1004,7 +1005,7 @@ bool RepairNAND(IOS::HLE::Kernel& ios) static std::shared_ptr GetBluetoothDevice() { - auto* ios = IOS::HLE::GetIOS(); + auto* ios = Core::System::GetInstance().GetIOS(); return ios ? ios->GetDeviceByName("/dev/usb/oh1/57e/305") : nullptr; } diff --git a/Source/Core/DolphinNoGUI/Platform.cpp b/Source/Core/DolphinNoGUI/Platform.cpp index 52321da95c..04319b5da4 100644 --- a/Source/Core/DolphinNoGUI/Platform.cpp +++ b/Source/Core/DolphinNoGUI/Platform.cpp @@ -23,12 +23,12 @@ void Platform::UpdateRunningFlag() { if (m_shutdown_requested.TestAndClear()) { - const auto ios = IOS::HLE::GetIOS(); + auto& system = Core::System::GetInstance(); + const auto ios = system.GetIOS(); const auto stm = ios ? ios->GetDeviceByName("/dev/stm/eventhook") : nullptr; if (!m_tried_graceful_shutdown.IsSet() && stm && std::static_pointer_cast(stm)->HasHookInstalled()) { - auto& system = Core::System::GetInstance(); system.GetProcessorInterface().PowerButton_Tap(); m_tried_graceful_shutdown.Set(); } diff --git a/Source/Core/DolphinQt/Config/WiimoteControllersWidget.cpp b/Source/Core/DolphinQt/Config/WiimoteControllersWidget.cpp index 6fff6b9f37..32092b1145 100644 --- a/Source/Core/DolphinQt/Config/WiimoteControllersWidget.cpp +++ b/Source/Core/DolphinQt/Config/WiimoteControllersWidget.cpp @@ -209,7 +209,7 @@ void WiimoteControllersWidget::ConnectWidgets() void WiimoteControllersWidget::OnBluetoothPassthroughResetPressed() { - const auto ios = IOS::HLE::GetIOS(); + const auto ios = Core::System::GetInstance().GetIOS(); if (!ios) { @@ -226,7 +226,7 @@ void WiimoteControllersWidget::OnBluetoothPassthroughResetPressed() void WiimoteControllersWidget::OnBluetoothPassthroughSyncPressed() { - const auto ios = IOS::HLE::GetIOS(); + const auto ios = Core::System::GetInstance().GetIOS(); if (!ios) { diff --git a/Source/Core/DolphinQt/Debugger/NetworkWidget.cpp b/Source/Core/DolphinQt/Debugger/NetworkWidget.cpp index d62cc3de8c..d825a22bb1 100644 --- a/Source/Core/DolphinQt/Debugger/NetworkWidget.cpp +++ b/Source/Core/DolphinQt/Debugger/NetworkWidget.cpp @@ -252,7 +252,7 @@ void NetworkWidget::Update() // needed because there's a race condition on the IOS instance otherwise Core::CPUThreadGuard guard(Core::System::GetInstance()); - auto* ios = IOS::HLE::GetIOS(); + auto* ios = guard.GetSystem().GetIOS(); if (!ios) return; diff --git a/Source/Core/UICommon/UICommon.cpp b/Source/Core/UICommon/UICommon.cpp index 9fccc19965..eff685e5c7 100644 --- a/Source/Core/UICommon/UICommon.cpp +++ b/Source/Core/UICommon/UICommon.cpp @@ -483,7 +483,7 @@ void SetUserDirectory(std::string custom_path) bool TriggerSTMPowerEvent() { - const auto ios = IOS::HLE::GetIOS(); + const auto ios = Core::System::GetInstance().GetIOS(); if (!ios) return false;