diff --git a/source/menu/menu.cpp b/source/menu/menu.cpp index e76854f9..7ca968fd 100644 --- a/source/menu/menu.cpp +++ b/source/menu/menu.cpp @@ -10,6 +10,8 @@ #include #include #include +#include +#include #include "gecko.h" #include "defines.h" @@ -191,14 +193,19 @@ void CMenu::init(void) } m_appDir = sfmt("%s:/%s", drive, APPDATA_DIR2); - gprintf("Wiiflow boot.dol Location: %s\n", m_appDir.c_str()); + m_cfg.load(sfmt("%s/" CFG_FILENAME, m_appDir.c_str()).c_str()); + if (m_cfg.getBool("GENERAL", "async_network") || has_enabled_providers() || m_cfg.getBool("DEBUG", "wifi_gecko")) + { + _initAsyncNetwork(); + while(net_get_status() == -EBUSY); + } - m_cfg.load(fmt("%s/" CFG_FILENAME, m_appDir.c_str())); + gprintf("Wiiflow boot.dol Location: %s\n", m_appDir.c_str()); //Gecko Output to SD if(!WriteToSD) { - WriteToSD = m_cfg.getBool("GENERAL", "sd_write_log", false); + WriteToSD = m_cfg.getBool("DEBUG", "sd_write_log", false); bufferMessages = WriteToSD; } diff --git a/source/menu/menu_download.cpp b/source/menu/menu_download.cpp index 6e4cbb60..229a6b4b 100644 --- a/source/menu/menu_download.cpp +++ b/source/menu/menu_download.cpp @@ -403,14 +403,14 @@ s32 CMenu::_networkComplete(s32 ok, void *usrData) m->m_networkInit = ok == 0; m->m_thrdNetwork = false; - bool wifigecko = m->m_cfg.getBool("GENERAL", "wifi_gecko", false); + bool wifigecko = m->m_cfg.getBool("DEBUG", "wifi_gecko", false); gprintf("NET: Network init complete, enabled wifi_gecko: %s\n", wifigecko ? "yes" : "no"); if (wifigecko) { // Get ip - std::string ip = m->m_cfg.getString("GENERAL", "wifi_gecko_ip"); - u16 port = m->m_cfg.getInt("GENERAL", "wifi_gecko_port"); + std::string ip = m->m_cfg.getString("DEBUG", "wifi_gecko_ip"); + u16 port = m->m_cfg.getInt("DEBUG", "wifi_gecko_port", 4405); if (ip.size() > 0 && port != 0) { diff --git a/tools/windows/WifiGeckoReader/readme.txt b/tools/windows/WifiGeckoReader/readme.txt index 9b225904..0be4db10 100644 --- a/tools/windows/WifiGeckoReader/readme.txt +++ b/tools/windows/WifiGeckoReader/readme.txt @@ -1,10 +1,9 @@ -WifiGeckoReader allows you to view the gecko debug messages over the wifi connection. Only use this when debugging. There is no need to use it regularly. - +WifiGeckoReader allows you to view the gecko debug messages over the wifi connection. Only use this when debugging. There is no need to use it regularly. Set wifi_gecko=no when not needed. It uses UDP port 4405. To make it work with wiiflow, edit or add the following wiiflow.ini lines: -[GENERAL] -async_network=yes + +[DEBUG] wifi_gecko=yes wifi_gecko_port=4405