diff --git a/out/boot.dol b/out/boot.dol index ef0325df..39059619 100644 Binary files a/out/boot.dol and b/out/boot.dol differ diff --git a/source/main.cpp b/source/main.cpp index a04a253d..a8e0cb7d 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -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 diff --git a/source/menu/menu_game_boot.cpp b/source/menu/menu_game_boot.cpp index 55b19048..20b7033f 100644 --- a/source/menu/menu_game_boot.cpp +++ b/source/menu/menu_game_boot.cpp @@ -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 - break; - } + _launch(&m_gameList[i]); // Launch will exit wiiflow + break; } } + _error(wfmt(_fmt("errgame1", L"Cannot find the game with ID: %s"), GameID)); }