Merge pull request #5079 from JosJuice/move-loadpatches

Move LoadPatches calls
This commit is contained in:
Markus Wick 2017-03-14 10:44:38 +01:00 committed by GitHub
commit 3aa5b8fbf6
3 changed files with 4 additions and 15 deletions

View File

@ -289,11 +289,8 @@ bool CBoot::BootUp()
// If we can't load the bootrom file we HLE it instead // If we can't load the bootrom file we HLE it instead
EmulatedBS2(_StartupPara.bWii); EmulatedBS2(_StartupPara.bWii);
} }
else
{
// Load patches if they weren't already
PatchEngine::LoadPatches(); PatchEngine::LoadPatches();
}
// Scan for common HLE functions // Scan for common HLE functions
if (_StartupPara.bHLE_BS2 && !_StartupPara.bEnableDebugging) if (_StartupPara.bHLE_BS2 && !_StartupPara.bEnableDebugging)
@ -436,6 +433,8 @@ bool CBoot::BootUp()
case SConfig::BOOT_WII_NAND: case SConfig::BOOT_WII_NAND:
Boot_WiiWAD(_StartupPara.m_strFilename); Boot_WiiWAD(_StartupPara.m_strFilename);
PatchEngine::LoadPatches();
if (LoadMapFromFilename()) if (LoadMapFromFilename())
HLE::PatchFunctions(); HLE::PatchFunctions();

View File

@ -182,9 +182,6 @@ bool CBoot::EmulatedBS2_GC(bool skipAppLoader)
// return // return
PC = PowerPC::ppcState.gpr[3]; PC = PowerPC::ppcState.gpr[3];
// Load patches
PatchEngine::LoadPatches();
return true; return true;
} }

View File

@ -20,8 +20,6 @@
#include "Core/PatchEngine.h" #include "Core/PatchEngine.h"
#include "DiscIO/NANDContentLoader.h" #include "DiscIO/NANDContentLoader.h"
#include "DiscIO/Volume.h"
#include "DiscIO/VolumeCreator.h"
struct StateFlags struct StateFlags
{ {
@ -93,10 +91,5 @@ bool CBoot::Boot_WiiWAD(const std::string& _pFilename)
if (!IOS::HLE::BootstrapPPC(ContentLoader)) if (!IOS::HLE::BootstrapPPC(ContentLoader))
return false; return false;
// Load patches and run startup patches
const std::unique_ptr<DiscIO::IVolume> pVolume(DiscIO::CreateVolumeFromFilename(_pFilename));
if (pVolume != nullptr)
PatchEngine::LoadPatches();
return true; return true;
} }