mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 05:47:56 -07:00
Qt/Mapping: Fix mapping changes not being applied instantly
This commit is contained in:
parent
7a5e51cda7
commit
9e2f9db94c
@ -5,7 +5,10 @@
|
||||
#include "DolphinQt2/Config/Mapping/MappingBool.h"
|
||||
|
||||
#include "DolphinQt2/Config/Mapping/MappingWidget.h"
|
||||
|
||||
#include "InputCommon/ControllerEmu/ControllerEmu.h"
|
||||
#include "InputCommon/ControllerEmu/Setting/BooleanSetting.h"
|
||||
#include "InputCommon/ControllerInterface/ControllerInterface.h"
|
||||
|
||||
MappingBool::MappingBool(MappingWidget* widget, ControllerEmu::BooleanSetting* setting)
|
||||
: QCheckBox(tr(setting->m_ui_name.c_str())), m_parent(widget), m_setting(setting)
|
||||
@ -19,6 +22,7 @@ void MappingBool::Connect()
|
||||
connect(this, &QCheckBox::stateChanged, this, [this](int value) {
|
||||
m_setting->SetValue(value);
|
||||
m_parent->SaveSettings();
|
||||
m_parent->GetController()->UpdateReferences(g_controller_interface);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -117,6 +117,7 @@ void MappingButton::Detect()
|
||||
m_reference->SetExpression(expr.toStdString());
|
||||
m_parent->SaveSettings();
|
||||
Update();
|
||||
m_parent->GetController()->UpdateReferences(g_controller_interface);
|
||||
|
||||
if (m_parent->IsIterativeInput())
|
||||
m_parent->NextButton(this);
|
||||
|
@ -5,7 +5,10 @@
|
||||
#include "DolphinQt2/Config/Mapping/MappingNumeric.h"
|
||||
|
||||
#include "DolphinQt2/Config/Mapping/MappingWidget.h"
|
||||
|
||||
#include "InputCommon/ControllerEmu/ControllerEmu.h"
|
||||
#include "InputCommon/ControllerEmu/Setting/NumericSetting.h"
|
||||
#include "InputCommon/ControllerInterface/ControllerInterface.h"
|
||||
|
||||
MappingNumeric::MappingNumeric(MappingWidget* widget, ControllerEmu::NumericSetting* setting)
|
||||
: m_parent(widget), m_setting(setting)
|
||||
@ -21,6 +24,7 @@ void MappingNumeric::Connect()
|
||||
[this](int value) {
|
||||
m_setting->SetValue(static_cast<double>(value) / 100);
|
||||
m_parent->SaveSettings();
|
||||
m_parent->GetController()->UpdateReferences(g_controller_interface);
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user