mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 00:59:44 -06:00
Merge pull request #8456 from jordan-woyak/input-gate-race-fix
InputCommon: Make the "input gate" not racy.
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user