Core: Move Emulation IOS instance to System.

This commit is contained in:
Admiral H. Curtiss
2024-02-06 03:31:34 +01:00
parent ca81d8b8a6
commit e6ee217a7c
21 changed files with 65 additions and 51 deletions

View File

@ -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<IOS::HLE::STMEventHookDevice>(stm)->HasHookInstalled())
{
auto& system = Core::System::GetInstance();
system.GetProcessorInterface().PowerButton_Tap();
m_tried_graceful_shutdown.Set();
}