mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-11-18 17:29:17 +01:00
fixed Ocarina issue 689
This commit is contained in:
parent
1d48d64f72
commit
e9ba1a1a0e
@ -1110,17 +1110,23 @@ int MenuDiscList()
|
|||||||
/* Open gct File and check exist */
|
/* Open gct File and check exist */
|
||||||
sprintf(nipple, "%s%s.gct",Settings.Cheatcodespath,IDfull);
|
sprintf(nipple, "%s%s.gct",Settings.Cheatcodespath,IDfull);
|
||||||
exeFile = fopen (nipple ,"rb");
|
exeFile = fopen (nipple ,"rb");
|
||||||
|
|
||||||
|
if (exeFile==NULL)
|
||||||
|
{
|
||||||
|
sprintf(nipple, "%s %s",nipple,tr("does not exist! Loading game without cheats."));
|
||||||
|
WindowPrompt(tr("Error"),nipple,NULL,NULL,NULL,NULL,170);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
fseek (exeFile, 0, SEEK_END);
|
fseek (exeFile, 0, SEEK_END);
|
||||||
long size=ftell (exeFile);
|
long size=ftell (exeFile);
|
||||||
rewind (exeFile);
|
rewind (exeFile);
|
||||||
if (size>2056){
|
if (size>2056){
|
||||||
sprintf(nipple, "%s %s",nipple,tr("contains over 255 lines of code. It will produce unexpected results."));
|
sprintf(nipple, "%s %s",nipple,tr("contains over 255 lines of code. It will produce unexpected results."));
|
||||||
WindowPrompt(tr("Error"),nipple,NULL,NULL,NULL,NULL,170);
|
WindowPrompt(tr("Error"),nipple,NULL,NULL,NULL,NULL,170);
|
||||||
}if (exeFile==NULL)
|
}
|
||||||
{
|
|
||||||
sprintf(nipple, "%s %s",nipple,tr("does not exist! Loading game without cheats."));
|
|
||||||
WindowPrompt(tr("Error"),nipple,tr("OK"),NULL,NULL,NULL,170);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
SDCard_deInit();
|
SDCard_deInit();
|
||||||
wiilight(0);
|
wiilight(0);
|
||||||
@ -1172,21 +1178,28 @@ int MenuDiscList()
|
|||||||
/* Open gct File and check exist */
|
/* Open gct File and check exist */
|
||||||
sprintf(nipple, "%s%s.gct",Settings.Cheatcodespath,IDfull);
|
sprintf(nipple, "%s%s.gct",Settings.Cheatcodespath,IDfull);
|
||||||
exeFile = fopen (nipple ,"rb");
|
exeFile = fopen (nipple ,"rb");
|
||||||
fseek (exeFile, 0, SEEK_END);
|
if (exeFile==NULL)
|
||||||
long size=ftell (exeFile);
|
|
||||||
rewind (exeFile);
|
|
||||||
if (size>2056){
|
|
||||||
sprintf(nipple, "%s %s",nipple,tr("contains over 255 lines of code. It will produce unexpected results."));
|
|
||||||
WindowPrompt(tr("Error"),nipple,NULL,NULL,NULL,NULL,170);
|
|
||||||
}if (exeFile==NULL)
|
|
||||||
{
|
{
|
||||||
sprintf(nipple, "%s %s",nipple,tr("does not exist! Loading game without cheats."));
|
sprintf(nipple, "%s %s",nipple,tr("does not exist! Loading game without cheats."));
|
||||||
WindowPrompt(tr("Error"),nipple,NULL,NULL,NULL,NULL,170);
|
WindowPrompt(tr("Error"),nipple,NULL,NULL,NULL,NULL,170);
|
||||||
}
|
}
|
||||||
} SDCard_deInit();
|
else
|
||||||
wiilight(0);
|
{
|
||||||
returnHere = false;
|
fseek (exeFile, 0, SEEK_END);
|
||||||
menu = MENU_EXIT;
|
long size=ftell (exeFile);
|
||||||
|
rewind (exeFile);
|
||||||
|
fclose(exeFile);
|
||||||
|
if (size>2056){
|
||||||
|
sprintf(nipple, "%s %s",nipple,tr("contains over 255 lines of code. It will produce unexpected results."));
|
||||||
|
WindowPrompt(tr("Error"),nipple,NULL,NULL,NULL,NULL,170);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
SDCard_deInit();
|
||||||
|
wiilight(0);
|
||||||
|
returnHere = false;
|
||||||
|
menu = MENU_EXIT;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user