mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-27 13:44:15 +01:00
-changed wiimote init again, now initing it on the very beginning (lets hope it helps some people)
This commit is contained in:
parent
1a4626af43
commit
39f7818869
@ -40,16 +40,20 @@ void Open_Inputs(void)
|
|||||||
WPAD_SetPowerButtonCallback(__Wpad_PowerCallback);
|
WPAD_SetPowerButtonCallback(__Wpad_PowerCallback);
|
||||||
|
|
||||||
WPAD_SetDataFormat(WPAD_CHAN_ALL, WPAD_FMT_BTNS_ACC_IR);
|
WPAD_SetDataFormat(WPAD_CHAN_ALL, WPAD_FMT_BTNS_ACC_IR);
|
||||||
|
|
||||||
|
WPAD_SetIdleTimeout(60*5); // idle after 5 minutes
|
||||||
}
|
}
|
||||||
|
|
||||||
void Close_Inputs(void)
|
void Close_Inputs(void)
|
||||||
{
|
{
|
||||||
while(WPAD_GetStatus() == WPAD_STATE_ENABLING); //Possible freeze if i keep this here?
|
u32 cnt;
|
||||||
if(WPAD_GetStatus() == WPAD_STATE_ENABLED)
|
|
||||||
{
|
/* Disconnect Wiimotes */
|
||||||
WPAD_Flush(WPAD_CHAN_ALL);
|
for (cnt = 0; cnt < 4; cnt++)
|
||||||
WPAD_Shutdown();
|
WPAD_Disconnect(cnt);
|
||||||
}
|
|
||||||
|
/* Shutdown Wiimote subsystem */
|
||||||
|
WPAD_Shutdown();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Sys_Exiting(void)
|
bool Sys_Exiting(void)
|
||||||
|
@ -50,29 +50,30 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
gprintf("Loading cIOS: %d\n", mainIOS);
|
gprintf("Loading cIOS: %d\n", mainIOS);
|
||||||
|
|
||||||
|
|
||||||
ISFS_Initialize();
|
ISFS_Initialize();
|
||||||
|
|
||||||
// Load Custom IOS
|
// Load Custom IOS
|
||||||
bool iosOK = loadIOS(mainIOS, false);
|
bool iosOK = loadIOS(mainIOS, false);
|
||||||
MEM2_init(52);
|
MEM2_init(52);
|
||||||
|
|
||||||
u8 mainIOSBase = 0;
|
u8 mainIOSBase = 0;
|
||||||
iosOK = iosOK && cIOSInfo::D2X(mainIOS, &mainIOSBase);
|
iosOK = iosOK && cIOSInfo::D2X(mainIOS, &mainIOSBase);
|
||||||
gprintf("Loaded cIOS: %u has base %u\n", mainIOS, mainIOSBase);
|
gprintf("Loaded cIOS: %u has base %u\n", mainIOS, mainIOSBase);
|
||||||
|
|
||||||
|
Open_Inputs(); //init wiimote early
|
||||||
|
|
||||||
// Init video
|
// Init video
|
||||||
vid.init();
|
vid.init();
|
||||||
WIILIGHT_Init();
|
WIILIGHT_Init();
|
||||||
|
|
||||||
vid.waitMessage(0.2f);
|
vid.waitMessage(0.2f);
|
||||||
|
|
||||||
// Init
|
// Init
|
||||||
Sys_Init();
|
Sys_Init();
|
||||||
Sys_ExitTo(EXIT_TO_HBC);
|
Sys_ExitTo(EXIT_TO_HBC);
|
||||||
|
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
bool deviceAvailable = false;
|
bool deviceAvailable = false;
|
||||||
@ -94,7 +95,7 @@ int main(int argc, char **argv)
|
|||||||
CMenu menu(vid);
|
CMenu menu(vid);
|
||||||
menu.init();
|
menu.init();
|
||||||
|
|
||||||
Open_Inputs(); //we should init inputs as last point
|
//Open_Inputs(); //we should init inputs as last point
|
||||||
|
|
||||||
mainMenu = &menu;
|
mainMenu = &menu;
|
||||||
if (!iosOK)
|
if (!iosOK)
|
||||||
@ -120,7 +121,7 @@ int main(int argc, char **argv)
|
|||||||
IOS_ReloadIOS(58);
|
IOS_ReloadIOS(58);
|
||||||
BootHomebrew();
|
BootHomebrew();
|
||||||
}
|
}
|
||||||
|
Open_Inputs(); //reinit wiimote
|
||||||
} while (ret == 1);
|
} while (ret == 1);
|
||||||
|
|
||||||
WifiGecko_Close();
|
WifiGecko_Close();
|
||||||
|
Loading…
Reference in New Issue
Block a user