From 5a74343d06c96a643200a63ee6c87736c1036468 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Sun, 26 Feb 2017 20:47:05 +0100 Subject: [PATCH] IOS/ES: Add logging for title context changes --- Source/Core/Core/IOS/ES/ES.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Source/Core/Core/IOS/ES/ES.cpp b/Source/Core/Core/IOS/ES/ES.cpp index 28a46422de..9cf977f439 100644 --- a/Source/Core/Core/IOS/ES/ES.cpp +++ b/Source/Core/Core/IOS/ES/ES.cpp @@ -185,6 +185,8 @@ void TitleContext::UpdateRunningGame() const PatchEngine::Shutdown(); PatchEngine::LoadPatches(); HiresTexture::Update(); + + NOTICE_LOG(IOS_ES, "Active title: %016" PRIx64, tmd.GetTitleId()); } void ES::LoadWAD(const std::string& _rContentFile) @@ -194,6 +196,7 @@ void ES::LoadWAD(const std::string& _rContentFile) // without installing them (which is a bit of a hack), we have to do this manually here. const auto& content_loader = DiscIO::CNANDContentManager::Access().GetNANDLoader(s_content_file); s_title_context.Update(content_loader); + INFO_LOG(IOS_ES, "LoadWAD: Title context changed: %016" PRIx64, s_title_context.tmd.GetTitleId()); } void ES::DecryptContent(u32 key_index, u8* iv, u8* input, u32 size, u8* new_iv, u8* output) @@ -207,6 +210,7 @@ void ES::DecryptContent(u32 key_index, u8* iv, u8* input, u32 size, u8* new_iv, bool ES::LaunchTitle(u64 title_id, bool skip_reload) { s_title_context.Clear(); + INFO_LOG(IOS_ES, "ES_Launch: Title context changed: (none)"); NOTICE_LOG(IOS_ES, "Launching title %016" PRIx64 "...", title_id); @@ -247,6 +251,8 @@ bool ES::LaunchPPCTitle(u64 title_id, bool skip_reload) } s_title_context.Update(content_loader); + INFO_LOG(IOS_ES, "LaunchPPCTitle: Title context changed: %016" PRIx64, + s_title_context.tmd.GetTitleId()); return BootstrapPPC(content_loader); } @@ -1488,6 +1494,7 @@ const DiscIO::CNANDContentLoader& ES::AccessContentDevice(u64 title_id) s32 ES::DIVerify(const IOS::ES::TMDReader& tmd, const IOS::ES::TicketReader& ticket) { s_title_context.Clear(); + INFO_LOG(IOS_ES, "ES_DIVerify: Title context changed: (none)"); if (!tmd.IsValid() || !ticket.IsValid()) return ES_PARAMETER_SIZE_OR_ALIGNMENT; @@ -1514,6 +1521,7 @@ s32 ES::DIVerify(const IOS::ES::TMDReader& tmd, const IOS::ES::TicketReader& tic DiscIO::CNANDContentManager::Access().ClearCache(); s_title_context.Update(tmd, ticket); + INFO_LOG(IOS_ES, "ES_DIVerify: Title context changed: %016" PRIx64, tmd.GetTitleId()); return IPC_SUCCESS; } } // namespace Device