-fix for last commit. now wii games should work via wiigsc.

This commit is contained in:
Fledge68 2024-07-29 09:29:08 -05:00
parent a1f72297e3
commit 6c1e85279e
2 changed files with 11 additions and 7 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 MiB

After

Width:  |  Height:  |  Size: 4.4 MiB

View File

@ -40,7 +40,8 @@ int main(int argc, char **argv)
gprintf(" \nWelcome to %s %s!\nThis is the debug output.\n", APP_NAME, APP_VERSION);
#endif
char *gameid = NULL;
char gameid[6];
memset(&gameid, 0, sizeof(gameid));
bool wait_loop = false;
char wait_dir[256];
memset(&wait_dir, 0, sizeof(wait_dir));
@ -63,11 +64,14 @@ int main(int argc, char **argv)
wait_loop = true;
else if(strlen(argv[i]) == 6 || strlen(argv[i]) == 4)
{
gameid = argv[i];
for(u8 i = 0; i < strlen(argv[i]) - 1; i++)
strcpy(gameid, argv[i]);
for(u8 i = 0; i < strlen(gameid) - 1; i++)
{
if(!isalnum(gameid[i]))
gameid = NULL;
{
gameid[0] = 0;
break;
}
}
}
@ -142,7 +146,7 @@ int main(int argc, char **argv)
bool usb_mounted = DeviceHandle.MountAllUSB();// only mounts any USB if !sdOnly
/* init wait images and show wait animation */
if(gameid == NULL)// dont show if autobooting a wii game.
if(strlen(gameid) == 0)// dont show if autobooting a wii game.
{
m_vid.setCustomWaitImgs(wait_dir, wait_loop);
m_vid.waitMessage(0.15f);
@ -161,7 +165,7 @@ int main(int argc, char **argv)
startup_successful = true;
if(!isWiiVC)
writeStub();// copy return stub to memory
if(!isWiiVC && gameid != NULL)// if argv game ID then launch it
if(!isWiiVC && strlen(gameid) != 0)// if argv game ID then launch it
mainMenu.directlaunch(gameid);
else
mainMenu.main();// start wiiflow with main menu displayed