If there are no controllers connected disable the mainWindow.

This commit is contained in:
giantpune 2009-05-31 07:31:26 +00:00
parent 268ec71c96
commit b757322838

View File

@ -2483,7 +2483,7 @@ ProgressUpdateWindow()
*
* Primary thread to allow GUI to respond to state changes, and draws GUI
***************************************************************************/
int noControllers=0;
static void *
UpdateGUI (void *arg)
{
@ -2509,6 +2509,15 @@ UpdateGUI (void *arg)
{
DoRumble(i);
}
if(WPAD_Probe(i, NULL) == WPAD_ERR_NO_CONTROLLER){
noControllers++;
if (noControllers == 4){
mainWindow->SetState(STATE_DISABLED);
}
}
else {noControllers =0;
mainWindow->SetState(STATE_DEFAULT);}
}
#endif