MappingWindow: don't store devq separately from controller default device

This commit is contained in:
Michael M
2017-11-04 15:29:15 -07:00
parent 9551fe1c73
commit ac855e2c93
6 changed files with 8 additions and 18 deletions

View File

@ -57,8 +57,7 @@ void MappingButton::OnButtonPressed()
Common::SleepCurrentThread(100);
const auto expr = MappingCommon::DetectExpression(
m_reference, dev.get(), m_parent->GetParent()->GetDeviceQualifier(),
m_parent->GetController()->GetDefaultDevice());
m_reference, dev.get(), m_parent->GetController()->GetDefaultDevice());
releaseMouse();
releaseKeyboard();
@ -90,7 +89,8 @@ void MappingButton::Clear()
void MappingButton::Update()
{
const auto lock = ControllerEmu::EmulatedController::GetStateLock();
m_reference->UpdateReference(g_controller_interface, m_parent->GetParent()->GetDeviceQualifier());
m_reference->UpdateReference(g_controller_interface,
m_parent->GetController()->GetDefaultDevice());
setText(EscapeAmpersand(QString::fromStdString(m_reference->GetExpression())));
}