From adf9218e7410576455915656045e7f38e89415b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Sat, 13 May 2017 22:08:07 +0200 Subject: [PATCH] IOS: Fix AddCoreDevices being called twice Also make sure m_title_id is set as soon as possible. --- Source/Core/Core/IOS/IOS.cpp | 7 +++++-- Source/Core/Core/IOS/IOS.h | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Source/Core/Core/IOS/IOS.cpp b/Source/Core/Core/IOS/IOS.cpp index eaf2fa605b..b213447665 100644 --- a/Source/Core/Core/IOS/IOS.cpp +++ b/Source/Core/Core/IOS/IOS.cpp @@ -200,9 +200,12 @@ Kernel::~Kernel() Core::ShutdownWiiRoot(); } -EmulationKernel::EmulationKernel(u64 title_id) +Kernel::Kernel(u64 title_id) : m_title_id(title_id) +{ +} + +EmulationKernel::EmulationKernel(u64 title_id) : Kernel(title_id) { - m_title_id = title_id; INFO_LOG(IOS, "Starting IOS %016" PRIx64, title_id); if (!SetupMemory(title_id, MemorySetupType::IOSReload)) diff --git a/Source/Core/Core/IOS/IOS.h b/Source/Core/Core/IOS/IOS.h index b9d540b7ba..0a01a547ad 100644 --- a/Source/Core/Core/IOS/IOS.h +++ b/Source/Core/Core/IOS/IOS.h @@ -118,6 +118,8 @@ public: IOSC& GetIOSC(); protected: + explicit Kernel(u64 title_id); + void ExecuteIPCCommand(u32 address); IPCCommandResult HandleIPCCommand(const Request& request); void EnqueueIPCAcknowledgement(u32 address, int cycles_in_future = 0);