mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-27 13:44:15 +01:00
Allow wifi-gecko to work close to game launch
This commit is contained in:
parent
40266a8909
commit
32cd3b0cd2
@ -286,8 +286,10 @@ s32 Disc_Wait(void)
|
||||
|
||||
s32 Disc_SetUSB(const u8 *id)
|
||||
{
|
||||
//gprintf("Trying set_frag_list\n");
|
||||
if (id) return set_frag_list((u8 *) id);
|
||||
|
||||
//gprintf("Trying WDVD_SetUSBMode\n");
|
||||
return WDVD_SetUSBMode(wbfsDev, (u8 *) id, -1);
|
||||
}
|
||||
|
||||
|
@ -335,6 +335,12 @@ s32 WDVD_SetFragList(int device, void *fraglist, int size)
|
||||
inbuf[2] = (u32)fraglist;
|
||||
inbuf[3] = size;
|
||||
|
||||
//int i;
|
||||
//for (i = 0; i < 8; i++)
|
||||
// gprintf("inbuf[%d] = %X\n", i, inbuf[i]);
|
||||
//ghexdump(fraglist, size);
|
||||
//gprintf("\n");
|
||||
|
||||
DCFlushRange(fraglist, size);
|
||||
s32 ret = IOS_Ioctl(di_fd, IOCTL_DI_SETFRAG, inbuf, sizeof(inbuf), outbuf, sizeof(outbuf));
|
||||
if (ret < 0) return ret;
|
||||
|
@ -28,9 +28,10 @@ void CMenu::error(const wstringEx &msg)
|
||||
_hideWaitMessage();
|
||||
m_btnMgr.setText(m_errorLblMessage, msg, true);
|
||||
_showError();
|
||||
|
||||
gprintf(msg.toUTF8().c_str());
|
||||
do
|
||||
{
|
||||
gprintf(msg.toUTF8().c_str());
|
||||
_mainLoopCommon();
|
||||
} while (!BTN_B_PRESSED && !BTN_A_PRESSED && !BTN_HOME_PRESSED);
|
||||
_hideError(false);
|
||||
|
@ -18,6 +18,9 @@
|
||||
#include "channel_launcher.h"
|
||||
#include "devicemounter/sdhc.h"
|
||||
|
||||
#include <network.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "loader/frag.h"
|
||||
#include "loader/fst.h"
|
||||
|
||||
@ -508,7 +511,7 @@ void CMenu::_game(bool launch)
|
||||
Playlog_Delete();
|
||||
}
|
||||
|
||||
gprintf("Launching game\n");
|
||||
gprintf("Launching game %s\n", id.c_str());
|
||||
_launch(hdr);
|
||||
|
||||
if(m_exit || bootHB) break;
|
||||
@ -793,6 +796,8 @@ int CMenu::_loadIOS(u8 ios, string id)
|
||||
int gameIOS = 0;
|
||||
int userIOS = 0;
|
||||
|
||||
gprintf("Game ID# %s requested IOS %d\n", id.c_str(), ios);
|
||||
|
||||
if (m_gcfg2.getInt(id, "ios", &userIOS) && _installed_cios.size() > 0)
|
||||
{
|
||||
for(CIOSItr itr = _installed_cios.begin(); itr != _installed_cios.end(); itr++)
|
||||
@ -995,6 +1000,7 @@ void CMenu::_launchGame(dir_discHdr *hdr, bool dvd)
|
||||
{
|
||||
string id = string((const char *) hdr->hdr.id);
|
||||
Nand::Instance()->Disable_Emu();
|
||||
bool using_wifi_gecko = m_cfg.getBool("DEBUG", "wifi_gecko");
|
||||
|
||||
if (dvd)
|
||||
{
|
||||
@ -1195,6 +1201,7 @@ void CMenu::_launchGame(dir_discHdr *hdr, bool dvd)
|
||||
app_gameconfig_load((u8 *) &hdr->hdr.id, gameconfig.get(), gameconfigSize);
|
||||
ocarina_load_code((u8 *) &hdr->hdr.id, cheatFile.get(), cheatSize);
|
||||
|
||||
if (!using_wifi_gecko)
|
||||
net_wc24cleanup();
|
||||
|
||||
bool iosLoaded = false;
|
||||
@ -1208,6 +1215,12 @@ void CMenu::_launchGame(dir_discHdr *hdr, bool dvd)
|
||||
iosLoaded = true;
|
||||
}
|
||||
|
||||
if (iosLoaded && using_wifi_gecko)
|
||||
{
|
||||
_initAsyncNetwork();
|
||||
while(net_get_status() == -EBUSY);
|
||||
}
|
||||
|
||||
if(emuSave)
|
||||
{
|
||||
if(iosLoaded) ISFS_Deinitialize();
|
||||
@ -1273,7 +1286,9 @@ void CMenu::_launchGame(dir_discHdr *hdr, bool dvd)
|
||||
}
|
||||
}
|
||||
|
||||
while(net_get_status() == -EBUSY);
|
||||
cleanup();
|
||||
// wifi-gecko can no longer function after cleanup
|
||||
Close_Inputs();
|
||||
USBStorage_Deinit();
|
||||
if(currentPartition == 0)
|
||||
|
Loading…
Reference in New Issue
Block a user