mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-25 23:55:38 +00:00
Temporarily disable polling while configuring inputs.
Polling is disabled once the first device is chosen, and resumed once the last device is configured.
This commit is contained in:
parent
1dfb45e133
commit
f4e2a14685
|
@ -44,6 +44,10 @@ bool GuiDetectDevice::input(InputConfig* config, Input input)
|
|||
if(!input.value)
|
||||
return false;
|
||||
|
||||
//don't allow device list to change once the first player has registered
|
||||
if(mCurrentPlayer == 0)
|
||||
mWindow->getInputManager()->stopPolling();
|
||||
|
||||
config->setPlayerNum(mCurrentPlayer);
|
||||
mWindow->getInputManager()->setNumPlayers(mWindow->getInputManager()->getNumPlayers() + 1); //inc total number of players
|
||||
mCurrentPlayer++;
|
||||
|
|
|
@ -38,6 +38,7 @@ bool GuiInputConfig::input(InputConfig* config, Input input)
|
|||
mWindow->pushGui(new GuiInputConfig(mWindow, mWindow->getInputManager()->getInputConfigByPlayer(mTargetConfig->getPlayerNum() + 1)));
|
||||
}else{
|
||||
mWindow->getInputManager()->writeConfig();
|
||||
mWindow->getInputManager()->startPolling(); //enable polling again since we're done
|
||||
GuiGameList::create(mWindow);
|
||||
}
|
||||
delete this;
|
||||
|
|
Loading…
Reference in a new issue