-fixed wii game launching from sd card (excite truck doesnt work from sd)

This commit is contained in:
fix94.1 2012-02-16 17:51:49 +00:00
parent cd9f2675a7
commit 7575c33e07
3 changed files with 18 additions and 3 deletions

View File

@ -1,3 +1,8 @@
#ifdef __cplusplus
extern "C"
{
#endif
#ifndef _SDHC_H_
#define _SDHC_H_
@ -16,3 +21,7 @@ extern int sdhc_mode_sd;
extern int sdhc_inited;
#endif
#ifdef __cplusplus
}
#endif

View File

@ -431,7 +431,11 @@ s32 Disc_WiiBoot(u8 vidMode, bool vipatch, bool countryString, u8 patchVidModes,
/* Find game partition offset */
s32 ret = __Disc_FindPartition(&offset);
if (ret < 0) return ret;
if (ret < 0)
{
gprintf("Game Partition not found!\n");
return ret;
}
/* Boot partition */
return Disc_BootPartition(offset, vidMode, vipatch, countryString, patchVidModes, disableIOSreload, aspectRatio);

View File

@ -16,6 +16,7 @@
#include "savefile.h"
#include "wip.h"
#include "channel_launcher.h"
#include "devicemounter/sdhc.h"
#include "loader/frag.h"
#include "loader/fst.h"
@ -1071,7 +1072,6 @@ void CMenu::_launchGame(dir_discHdr *hdr, bool dvd)
if(!DeviceHandler::Instance()->IsInserted(currentPartition))
DeviceHandler::Instance()->Mount(currentPartition);
DeviceHandler::Instance()->Mount(emuPartition);
}
if (!m_directLaunch)
@ -1116,7 +1116,9 @@ void CMenu::_launchGame(dir_discHdr *hdr, bool dvd)
cleanup();
Close_Inputs();
USBStorage_Deinit();
if(currentPartition == 0)
SDHC_Init();
if(gc)
{
memcpy((char*)hdr->hdr.id, id.c_str(),6);