From 363bf27cce6a8d57048f735daba0ba6e86322bc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Sun, 6 Aug 2017 20:06:19 +0800 Subject: [PATCH] Boot/BS2: Write empty play record --- Source/Core/Core/Boot/Boot_BS2Emu.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Source/Core/Core/Boot/Boot_BS2Emu.cpp b/Source/Core/Core/Boot/Boot_BS2Emu.cpp index 910fe5db81..a817fcca8f 100644 --- a/Source/Core/Core/Boot/Boot_BS2Emu.cpp +++ b/Source/Core/Core/Boot/Boot_BS2Emu.cpp @@ -319,6 +319,15 @@ bool CBoot::SetupWiiMemory(u64 ios_title_id) return true; } +static void WriteEmptyPlayRecord() +{ + const std::string file_path = + Common::GetTitleDataPath(Titles::SYSTEM_MENU, Common::FROM_SESSION_ROOT) + "play_rec.dat"; + File::IOFile playrec_file(file_path, "r+b"); + std::vector empty_record(0x80); + playrec_file.WriteBytes(empty_record.data(), empty_record.size()); +} + // __________________________________________________________________________________________________ // Wii Bootstrap 2 HLE: // copy the apploader to 0x81200000 @@ -335,6 +344,8 @@ bool CBoot::EmulatedBS2_Wii(const DiscIO::Volume& volume) if (!tmd.IsValid()) return false; + WriteEmptyPlayRecord(); + if (!SetupWiiMemory(tmd.GetIOSId())) return false;