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.)
This commit is contained in:
JosJuice 2017-03-13 22:19:30 +01:00
parent 8035270aa8
commit 09682cfaa4
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
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();

View File

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

View File

@ -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<DiscIO::IVolume> pVolume(DiscIO::CreateVolumeFromFilename(_pFilename));
if (pVolume != nullptr)
PatchEngine::LoadPatches();
return true;
}