From 5ed3a3f12d8b3eabd539b212455353ed367cb700 Mon Sep 17 00:00:00 2001 From: Pierre Bourdon Date: Thu, 17 Aug 2017 03:56:26 +0200 Subject: [PATCH] WFSI: Get the patch info from PREPARE_DEVICE. --- Source/Core/Core/IOS/WFS/WFSI.cpp | 4 +++- Source/Core/Core/IOS/WFS/WFSI.h | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Source/Core/Core/IOS/WFS/WFSI.cpp b/Source/Core/Core/IOS/WFS/WFSI.cpp index 9f3344d971..22f70ac912 100644 --- a/Source/Core/Core/IOS/WFS/WFSI.cpp +++ b/Source/Core/Core/IOS/WFS/WFSI.cpp @@ -98,9 +98,11 @@ IPCCommandResult WFSI::IOCtl(const IOCtlRequest& request) u32 tmd_addr = Memory::Read_U32(request.buffer_in); u32 tmd_size = Memory::Read_U32(request.buffer_in + 4); + m_patch_type = Memory::Read_U32(request.buffer_in + 32); m_continue_install = Memory::Read_U32(request.buffer_in + 36); - INFO_LOG(IOS_WFS, "IOCTL_WFSI_PREPARE_DEVICE"); + INFO_LOG(IOS_WFS, "IOCTL_WFSI_PREPARE_DEVICE: patch type %d, continue install: %s", + m_patch_type, m_continue_install ? "true" : "false"); constexpr u32 MAX_TMD_SIZE = 0x4000; if (tmd_size > MAX_TMD_SIZE) diff --git a/Source/Core/Core/IOS/WFS/WFSI.h b/Source/Core/Core/IOS/WFS/WFSI.h index d0ab4094d7..8898f0e8ec 100644 --- a/Source/Core/Core/IOS/WFS/WFSI.h +++ b/Source/Core/Core/IOS/WFS/WFSI.h @@ -60,7 +60,11 @@ private: // Set on PREPARE_DEVICE when the next profile application should not delete // temporary install files. - u32 m_continue_install = 0; + bool m_continue_install = false; + + // Set on PREPARE_DEVICE to indicate that the install is a patch and not a + // standalone title. + u32 m_patch_type = 0; ARCUnpacker m_arc_unpacker;