diff --git a/source/devicemounter/sdhc.h b/source/devicemounter/sdhc.h index 18453413..c0d987d4 100644 --- a/source/devicemounter/sdhc.h +++ b/source/devicemounter/sdhc.h @@ -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 \ No newline at end of file diff --git a/source/loader/disc.c b/source/loader/disc.c index 0f649ba0..f3500b59 100644 --- a/source/loader/disc.c +++ b/source/loader/disc.c @@ -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); diff --git a/source/menu/menu_game.cpp b/source/menu/menu_game.cpp index c24f7732..d81b44b9 100644 --- a/source/menu/menu_game.cpp +++ b/source/menu/menu_game.cpp @@ -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);