Qt/Input: disable in-game controls while the pad settings are opened

This commit is contained in:
Megamouse 2018-12-23 01:35:10 +01:00
parent e80f2793eb
commit b99a88afe2
6 changed files with 28 additions and 0 deletions

View file

@ -142,11 +142,21 @@ void pad_thread::Reset()
reset = active.load();
}
void pad_thread::SetEnabled(bool enabled)
{
is_enabled = enabled;
}
void pad_thread::ThreadFunc()
{
active = true;
while (active)
{
if (!is_enabled)
{
std::this_thread::sleep_for(1ms);
continue;
}
if (reset && reset.exchange(false))
{
Init();