mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-24 04:09:15 +01:00
-changed wiimote init code again to hopefully fix the init problem for everyone
This commit is contained in:
parent
7b82175d66
commit
24cd976235
@ -23,14 +23,23 @@ static bool return_to_priiloader = false;
|
|||||||
static bool return_to_disable = false;
|
static bool return_to_disable = false;
|
||||||
static bool return_to_bootmii = false;
|
static bool return_to_bootmii = false;
|
||||||
|
|
||||||
|
|
||||||
|
void __Wpad_PowerCallback(s32 chan)
|
||||||
|
{
|
||||||
|
/* Poweroff console */
|
||||||
|
shutdown = 1;
|
||||||
|
}
|
||||||
|
|
||||||
void Open_Inputs(void)
|
void Open_Inputs(void)
|
||||||
{
|
{
|
||||||
if(WPAD_GetStatus() != WPAD_STATE_ENABLED && WPAD_GetStatus() != WPAD_STATE_ENABLING)
|
/* Initialize Wiimote subsystem */
|
||||||
{
|
|
||||||
WPAD_Init();
|
|
||||||
PAD_Init();
|
PAD_Init();
|
||||||
|
WPAD_Init();
|
||||||
|
|
||||||
|
/* Set POWER button callback */
|
||||||
|
WPAD_SetPowerButtonCallback(__Wpad_PowerCallback);
|
||||||
|
|
||||||
WPAD_SetDataFormat(WPAD_CHAN_ALL, WPAD_FMT_BTNS_ACC_IR);
|
WPAD_SetDataFormat(WPAD_CHAN_ALL, WPAD_FMT_BTNS_ACC_IR);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Close_Inputs(void)
|
void Close_Inputs(void)
|
||||||
|
@ -89,12 +89,13 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
if(!deviceAvailable) Sys_Exit();
|
if(!deviceAvailable) Sys_Exit();
|
||||||
|
|
||||||
Open_Inputs(); // xFede: Initialize WPAD/PAD here, otherwise you could have a sync-delay on startup
|
|
||||||
|
|
||||||
bool dipOK = Disc_Init() >= 0;
|
bool dipOK = Disc_Init() >= 0;
|
||||||
|
|
||||||
CMenu menu(vid);
|
CMenu menu(vid);
|
||||||
menu.init();
|
menu.init();
|
||||||
|
|
||||||
|
Open_Inputs(); //we should init inputs as last point
|
||||||
|
|
||||||
mainMenu = &menu;
|
mainMenu = &menu;
|
||||||
if (!iosOK)
|
if (!iosOK)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user