mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-10-03 04:05:08 +02:00
If there are no controllers connected disable the mainWindow.
This commit is contained in:
parent
268ec71c96
commit
b757322838
@ -2483,10 +2483,10 @@ ProgressUpdateWindow()
|
|||||||
*
|
*
|
||||||
* Primary thread to allow GUI to respond to state changes, and draws GUI
|
* Primary thread to allow GUI to respond to state changes, and draws GUI
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
int noControllers=0;
|
||||||
static void *
|
static void *
|
||||||
UpdateGUI (void *arg)
|
UpdateGUI (void *arg)
|
||||||
{
|
{
|
||||||
while(1)
|
while(1)
|
||||||
{
|
{
|
||||||
if(guiHalt)
|
if(guiHalt)
|
||||||
@ -2509,6 +2509,15 @@ UpdateGUI (void *arg)
|
|||||||
{
|
{
|
||||||
DoRumble(i);
|
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
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user