- fixed to launch wii, gamecube, and wiiware/vc games via wiigsc. note you should have wiiflow, these games, and their settings all set via wfl first. wiigsc is just a short cut to lauch wfl with args set to launch a specific game ID.

This commit is contained in:
Fledge68 2024-07-15 15:22:41 -05:00
parent 48fdaf50e2
commit a1f72297e3
3 changed files with 14 additions and 16 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 MiB

After

Width:  |  Height:  |  Size: 4.4 MiB

View File

@ -61,10 +61,10 @@ int main(int argc, char **argv)
}
else if(strcasestr(argv[i], "Waitloop") != NULL)
wait_loop = true;
else if(strlen(argv[i]) == 6)
else if(strlen(argv[i]) == 6 || strlen(argv[i]) == 4)
{
gameid = argv[i];
for(u8 i = 0; i < 5; i++)
for(u8 i = 0; i < strlen(argv[i]) - 1; i++)
{
if(!isalnum(gameid[i]))
gameid = NULL;
@ -161,7 +161,7 @@ int main(int argc, char **argv)
startup_successful = true;
if(!isWiiVC)
writeStub();// copy return stub to memory
if(!isWiiVC && gameid != NULL && strlen(gameid) == 6)// if argv game ID then launch it
if(!isWiiVC && gameid != NULL)// if argv game ID then launch it
mainMenu.directlaunch(gameid);
else
mainMenu.main();// start wiiflow with main menu displayed

View File

@ -76,23 +76,21 @@ static u8 GetRequestedGameIOS(dir_discHdr *hdr)
void CMenu::directlaunch(const char *GameID)// from boot arg for wii game only
{
m_directLaunch = true;
currentPartition = m_cfg.getInt(WII_DOMAIN, "partition");
if(DeviceHandle.IsInserted(currentPartition))
u8 chantypes = m_cfg.getUInt(CHANNEL_DOMAIN, "channels_type", CHANNELS_REAL);
m_cfg.setUInt(CHANNEL_DOMAIN, "channels_type", CHANNELS_EMU);
m_current_view = COVERFLOW_WII | COVERFLOW_GAMECUBE | COVERFLOW_CHANNEL;
_loadList();
m_cfg.setUInt(CHANNEL_DOMAIN, "channels_type", chantypes);
for(u32 i = 0; i < m_gameList.size(); i++)
{
DeviceHandle.OpenWBFS(currentPartition);
string gameDir(fmt(wii_games_dir, DeviceName[currentPartition]));
string cacheDir(fmt("%s/%s_wii.db", m_listCacheDir.c_str(), DeviceName[currentPartition]));
m_cacheList.CreateList(COVERFLOW_WII, gameDir, stringToVector(".wbfs|.iso", '|'), cacheDir, false);
WBFS_Close();
for(u32 i = 0; i < m_cacheList.size(); i++)
if(strncasecmp(GameID, m_gameList[i].id, 6) == 0)
{
if(strncasecmp(GameID, m_cacheList[i].id, 6) == 0)
{
_launchWii(&m_cacheList[i], false); // Launch will exit wiiflow
_launch(&m_gameList[i]); // Launch will exit wiiflow
break;
}
}
}
_error(wfmt(_fmt("errgame1", L"Cannot find the game with ID: %s"), GameID));
}