Merge pull request #8456 from jordan-woyak/input-gate-race-fix

InputCommon: Make the "input gate" not racy.
This commit is contained in:
Connor McLaughlin
2019-11-11 10:59:49 +10:00
committed by GitHub
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"
@ -1045,4 +1046,11 @@ void DoFrameStep()
}
}
void UpdateInputGate()
{
ControlReference::SetInputGate(
(SConfig::GetInstance().m_BackgroundInput || Host_RendererHasFocus()) &&
!Host_UIBlocksControllerState());
}
} // namespace Core