InputCommon: Make the "input gate" not racey.

This commit is contained in:
Jordan Woyak
2019-11-06 15:59:36 -06:00
parent 93d7b3d159
commit 85ceb37ccd
17 changed files with 32 additions and 63 deletions

View File

@ -72,6 +72,7 @@
#include "Core/MemoryWatcher.h"
#endif
#include "InputCommon/ControlReference/ControlReference.h"
#include "InputCommon/ControllerInterface/ControllerInterface.h"
#include "InputCommon/GCAdapter.h"
@ -1035,4 +1036,11 @@ void DoFrameStep()
}
}
void UpdateInputGate()
{
ControlReference::SetInputGate(
(SConfig::GetInstance().m_BackgroundInput || Host_RendererHasFocus()) &&
!Host_UIBlocksControllerState());
}
} // namespace Core