From 09682cfaa4794858feddb7f1808de0b23850d1cb Mon Sep 17 00:00:00 2001 From: JosJuice Date: Mon, 13 Mar 2017 22:19:30 +0100 Subject: [PATCH] Move LoadPatches calls LoadPatches was apparently never being called when booting Wii discs. Maybe this will fix the recent regression with cheat codes not getting loaded? I don't know how this managed to work to begin with, though... (The call was also moved for WADs, just for consistency.) --- Source/Core/Core/Boot/Boot.cpp | 9 ++++----- Source/Core/Core/Boot/Boot_BS2Emu.cpp | 3 --- Source/Core/Core/Boot/Boot_WiiWAD.cpp | 7 ------- 3 files changed, 4 insertions(+), 15 deletions(-) diff --git a/Source/Core/Core/Boot/Boot.cpp b/Source/Core/Core/Boot/Boot.cpp index 53718ab03c..897891f253 100644 --- a/Source/Core/Core/Boot/Boot.cpp +++ b/Source/Core/Core/Boot/Boot.cpp @@ -289,11 +289,8 @@ bool CBoot::BootUp() // If we can't load the bootrom file we HLE it instead EmulatedBS2(_StartupPara.bWii); } - else - { - // Load patches if they weren't already - PatchEngine::LoadPatches(); - } + + PatchEngine::LoadPatches(); // Scan for common HLE functions if (_StartupPara.bHLE_BS2 && !_StartupPara.bEnableDebugging) @@ -436,6 +433,8 @@ bool CBoot::BootUp() case SConfig::BOOT_WII_NAND: Boot_WiiWAD(_StartupPara.m_strFilename); + PatchEngine::LoadPatches(); + if (LoadMapFromFilename()) HLE::PatchFunctions(); diff --git a/Source/Core/Core/Boot/Boot_BS2Emu.cpp b/Source/Core/Core/Boot/Boot_BS2Emu.cpp index cd5742b56f..c068504703 100644 --- a/Source/Core/Core/Boot/Boot_BS2Emu.cpp +++ b/Source/Core/Core/Boot/Boot_BS2Emu.cpp @@ -182,9 +182,6 @@ bool CBoot::EmulatedBS2_GC(bool skipAppLoader) // return PC = PowerPC::ppcState.gpr[3]; - // Load patches - PatchEngine::LoadPatches(); - return true; } diff --git a/Source/Core/Core/Boot/Boot_WiiWAD.cpp b/Source/Core/Core/Boot/Boot_WiiWAD.cpp index ecb72defcd..0750af9a8f 100644 --- a/Source/Core/Core/Boot/Boot_WiiWAD.cpp +++ b/Source/Core/Core/Boot/Boot_WiiWAD.cpp @@ -20,8 +20,6 @@ #include "Core/PatchEngine.h" #include "DiscIO/NANDContentLoader.h" -#include "DiscIO/Volume.h" -#include "DiscIO/VolumeCreator.h" struct StateFlags { @@ -93,10 +91,5 @@ bool CBoot::Boot_WiiWAD(const std::string& _pFilename) if (!IOS::HLE::BootstrapPPC(ContentLoader)) return false; - // Load patches and run startup patches - const std::unique_ptr pVolume(DiscIO::CreateVolumeFromFilename(_pFilename)); - if (pVolume != nullptr) - PatchEngine::LoadPatches(); - return true; }