mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Qt Mapping*: make logic around setting/loading settings more consistent
Changes: - signal for widget value changed: sets controller setting, saves settings - Update(): only updates widget from existing controller setting - Clear(): sets controller setting, saves settings, and calls Update()
This commit is contained in:
@ -57,14 +57,15 @@ QGroupBox* MappingWidget::CreateGroupBox(const QString& name, ControllerEmu::Con
|
||||
|
||||
auto* control_ref = control->control_ref.get();
|
||||
|
||||
connect(button, &MappingButton::AdvancedPressed, [this, control_ref] {
|
||||
connect(button, &MappingButton::AdvancedPressed, [this, button, control_ref] {
|
||||
if (m_parent->GetDevice() == nullptr)
|
||||
return;
|
||||
|
||||
IOWindow io(this, m_parent->GetController(), control_ref,
|
||||
control_ref->IsInput() ? IOWindow::Type::Input : IOWindow::Type::Output);
|
||||
io.exec();
|
||||
Update();
|
||||
SaveSettings();
|
||||
button->Update();
|
||||
});
|
||||
|
||||
m_buttons.push_back(button);
|
||||
@ -111,8 +112,6 @@ void MappingWidget::Update()
|
||||
|
||||
for (auto* checkbox : m_bools)
|
||||
checkbox->Update();
|
||||
|
||||
LoadSettings();
|
||||
}
|
||||
|
||||
ControllerEmu::EmulatedController* MappingWidget::GetController() const
|
||||
|
Reference in New Issue
Block a user