Fix inability to boot NAND contents caused by 04c41c1d38
.
Might be nice to refactor this code to decrease duplication, but for now just a fix.
This commit is contained in:
parent
751c2e69f6
commit
b187a38433
|
@ -19,6 +19,8 @@
|
||||||
#include "VolumeCreator.h"
|
#include "VolumeCreator.h"
|
||||||
#include "CommonPaths.h"
|
#include "CommonPaths.h"
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
static u32 state_checksum(u32 *buf, int len)
|
static u32 state_checksum(u32 *buf, int len)
|
||||||
{
|
{
|
||||||
u32 checksum = 0;
|
u32 checksum = 0;
|
||||||
|
@ -89,9 +91,17 @@ bool CBoot::Boot_WiiWAD(const char* _pFilename)
|
||||||
|
|
||||||
WII_IPC_HLE_Interface::SetDefaultContentFile(_pFilename);
|
WII_IPC_HLE_Interface::SetDefaultContentFile(_pFilename);
|
||||||
|
|
||||||
CDolLoader DolLoader(pContent->m_pData, pContent->m_Size);
|
std::unique_ptr<CDolLoader> pDolLoader;
|
||||||
DolLoader.Load();
|
if (pContent->m_pData)
|
||||||
PC = DolLoader.GetEntryPoint() | 0x80000000;
|
{
|
||||||
|
pDolLoader.reset(new CDolLoader(pContent->m_pData, pContent->m_Size));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pDolLoader.reset(new CDolLoader(pContent->m_Filename.c_str()));
|
||||||
|
}
|
||||||
|
pDolLoader->Load();
|
||||||
|
PC = pDolLoader->GetEntryPoint() | 0x80000000;
|
||||||
|
|
||||||
// Pass the "#002 check"
|
// Pass the "#002 check"
|
||||||
// Apploader should write the IOS version and revision to 0x3140, and compare it
|
// Apploader should write the IOS version and revision to 0x3140, and compare it
|
||||||
|
|
|
@ -847,12 +847,19 @@ bool CWII_IPC_HLE_Device_es::IOCtlV(u32 _CommandAddress)
|
||||||
if (pContent)
|
if (pContent)
|
||||||
{
|
{
|
||||||
LoadWAD(Common::GetTitleContentPath(TitleID));
|
LoadWAD(Common::GetTitleContentPath(TitleID));
|
||||||
CDolLoader DolLoader(pContent->m_pData, pContent->m_Size);
|
std::unique_ptr<CDolLoader> pDolLoader;
|
||||||
DolLoader.Load(); // TODO: Check why sysmenu does not load the DOL correctly
|
if (pContent->m_pData)
|
||||||
PC = DolLoader.GetEntryPoint() | 0x80000000;
|
{
|
||||||
|
pDolLoader.reset(new CDolLoader(pContent->m_pData, pContent->m_Size));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pDolLoader.reset(new CDolLoader(pContent->m_Filename.c_str()));
|
||||||
|
}
|
||||||
|
pDolLoader->Load(); // TODO: Check why sysmenu does not load the DOL correctly
|
||||||
|
PC = pDolLoader->GetEntryPoint() | 0x80000000;
|
||||||
IOSv = ContentLoader.GetIosVersion();
|
IOSv = ContentLoader.GetIosVersion();
|
||||||
bSuccess = true;
|
bSuccess = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue