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

@ -13,7 +13,6 @@
#include "DolphinQt/Config/Mapping/MappingIndicator.h"
#include "DolphinQt/Config/Mapping/MappingNumeric.h"
#include "DolphinQt/Config/Mapping/MappingWindow.h"
#include "DolphinQt/Settings.h"
#include "InputCommon/ControlReference/ControlReference.h"
#include "InputCommon/ControllerEmu/Control/Control.h"
@ -30,11 +29,8 @@ MappingWidget::MappingWidget(MappingWindow* parent) : m_parent(parent)
const auto timer = new QTimer(this);
connect(timer, &QTimer::timeout, this, [this] {
// TODO: The SetControllerStateNeeded interface leaks input into the game.
const auto lock = m_parent->GetController()->GetStateLock();
Settings::Instance().SetControllerStateNeeded(true);
emit Update();
Settings::Instance().SetControllerStateNeeded(false);
});
timer->start(1000 / INDICATOR_UPDATE_FREQ);