* Fixed compiling on Mac/Linux

* Fixed "return to NK2O" not working with neek.
This commit is contained in:
cyan06 2015-07-07 19:34:32 +00:00
parent f49b732a3b
commit be6092e1e9
4 changed files with 161 additions and 157 deletions

View File

@ -2,8 +2,8 @@
<app version="1"> <app version="1">
<name> USB Loader GX</name> <name> USB Loader GX</name>
<coder>USB Loader GX Team</coder> <coder>USB Loader GX Team</coder>
<version>3.0 r1250</version> <version>3.0 r1251</version>
<release_date>20150705141019</release_date> <release_date>20150707190220</release_date>
<!-- // remove this line to enable arguments <!-- // remove this line to enable arguments
<arguments> <arguments>
<arg>--ios=250</arg> <arg>--ios=250</arg>

View File

@ -1547,6 +1547,7 @@ int GameBooter::BootNeek(struct discHdr *gameHdr)
u64 returnToChoice = game_cfg->returnTo; u64 returnToChoice = game_cfg->returnTo;
const char *NandEmuPath = game_cfg->NandEmuPath.size() == 0 ? Settings.NandEmuChanPath : game_cfg->NandEmuPath.c_str(); const char *NandEmuPath = game_cfg->NandEmuPath.size() == 0 ? Settings.NandEmuChanPath : game_cfg->NandEmuPath.c_str();
bool autoboot = true; bool autoboot = true;
bool NK2O_isInstalled = false;
char tempPath[100] = ""; char tempPath[100] = "";
int ret = -1; int ret = -1;
@ -1655,6 +1656,12 @@ int GameBooter::BootNeek(struct discHdr *gameHdr)
if(CheckFile(tempPath)) if(CheckFile(tempPath))
RemoveFile(tempPath); RemoveFile(tempPath);
} }
else
{
snprintf(tempPath, sizeof(tempPath), "%s/title/00010001/4e4b324f/content/title.tmd", NandEmuPath);
if(CheckFile(tempPath))
NK2O_isInstalled = true;
}
// Every checks passed successfully. Continue execution. // Every checks passed successfully. Continue execution.
@ -1684,19 +1691,16 @@ int GameBooter::BootNeek(struct discHdr *gameHdr)
if(autoboot && returnToChoice) if(autoboot && returnToChoice)
{ {
// Todo : allow user to select the channel to return to. // Todo : allow user to select the channel to return to.
if(NK2O_isInstalled)
// check if NK2O is installed
snprintf(tempPath, sizeof(tempPath), "%s/title/00010001/4e4b324f/content/title.tmd", NandEmuPath);
if(CheckFile(tempPath))
{ {
neek_config->returnto = TITLE_ID(0x00010001, 'NK2O'); // Currently forced to NK2O user channel neek_config->returnto = TITLE_ID(0x00010001, 'NK2O'); // Currently forced to NK2O user channel
neek_config->config |= NCON_EXT_RETURN_TO; // enable "return to" patch neek_config->config |= NCON_EXT_RETURN_TO; // enable "return to" patch
} }
if(isWiiU()) if(isWiiU())
{ {
neek_config->returnto = TITLE_ID(0x00010002, 'HCVA');// Currently forced to "Return to WiiU" system channel neek_config->returnto = TITLE_ID(0x00010002, 'HCVA'); // Currently forced to "Return to WiiU" system channel
neek_config->config |= NCON_EXT_RETURN_TO; // enable "return to" patch neek_config->config |= NCON_EXT_RETURN_TO; // enable "return to" patch
} }
} }