Moved _initAsyncNetwork so it starts when the program starts. This way wifi-gecko is connected earlier and you can see the initialization messages.

Moved the following settings to [DEBUG] section, so people know they have nothing to do with normal wiiflow operation.
 sd_write_log
 wifi_gecko
 wifi_gecko_ip
 wifi_gecko_port
This commit is contained in:
yardape8000 2012-05-10 22:20:18 +00:00
parent b56b9662c3
commit 84fc87bea9
3 changed files with 16 additions and 10 deletions

View File

@ -10,6 +10,8 @@
#include <dirent.h>
#include <time.h>
#include <wchar.h>
#include <network.h>
#include <errno.h>
#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;
}

View File

@ -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)
{

View File

@ -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