-changed wiimote init code again to hopefully fix the init problem for everyone

This commit is contained in:
fix94.1 2012-01-30 16:55:27 +00:00
parent 7b82175d66
commit 24cd976235
2 changed files with 18 additions and 8 deletions

View File

@ -23,14 +23,23 @@ static bool return_to_priiloader = false;
static bool return_to_disable = false;
static bool return_to_bootmii = false;
void __Wpad_PowerCallback(s32 chan)
{
/* Poweroff console */
shutdown = 1;
}
void Open_Inputs(void)
{
if(WPAD_GetStatus() != WPAD_STATE_ENABLED && WPAD_GetStatus() != WPAD_STATE_ENABLING)
{
WPAD_Init();
PAD_Init();
WPAD_SetDataFormat(WPAD_CHAN_ALL, WPAD_FMT_BTNS_ACC_IR);
}
/* Initialize Wiimote subsystem */
PAD_Init();
WPAD_Init();
/* Set POWER button callback */
WPAD_SetPowerButtonCallback(__Wpad_PowerCallback);
WPAD_SetDataFormat(WPAD_CHAN_ALL, WPAD_FMT_BTNS_ACC_IR);
}
void Close_Inputs(void)

View File

@ -89,12 +89,13 @@ int main(int argc, char **argv)
}
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;
CMenu menu(vid);
menu.init();
Open_Inputs(); //we should init inputs as last point
mainMenu = &menu;
if (!iosOK)
{