mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-16 12:58:33 +02:00
InputCommon: Allow Wii remote extension to be set with an input expression.
This commit is contained in:
@ -11,6 +11,7 @@
|
||||
#include <QHBoxLayout>
|
||||
#include <QPushButton>
|
||||
#include <QTabWidget>
|
||||
#include <QTimer>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
#include "Core/Core.h"
|
||||
@ -62,6 +63,15 @@ MappingWindow::MappingWindow(QWidget* parent, Type type, int port_num)
|
||||
ConnectWidgets();
|
||||
SetMappingType(type);
|
||||
|
||||
const auto timer = new QTimer(this);
|
||||
connect(timer, &QTimer::timeout, this, [this] {
|
||||
const auto lock = GetController()->GetStateLock();
|
||||
emit Update();
|
||||
});
|
||||
|
||||
timer->start(1000 / INDICATOR_UPDATE_FREQ);
|
||||
|
||||
GetController()->GetStateLock();
|
||||
emit ConfigChanged();
|
||||
}
|
||||
|
||||
@ -235,6 +245,7 @@ void MappingWindow::OnLoadProfilePressed()
|
||||
m_controller->LoadConfig(ini.GetOrCreateSection("Profile"));
|
||||
m_controller->UpdateReferences(g_controller_interface);
|
||||
|
||||
GetController()->GetStateLock();
|
||||
emit ConfigChanged();
|
||||
}
|
||||
|
||||
@ -426,6 +437,8 @@ void MappingWindow::OnDefaultFieldsPressed()
|
||||
{
|
||||
m_controller->LoadDefaults(g_controller_interface);
|
||||
m_controller->UpdateReferences(g_controller_interface);
|
||||
|
||||
GetController()->GetStateLock();
|
||||
emit ConfigChanged();
|
||||
emit Save();
|
||||
}
|
||||
@ -441,6 +454,8 @@ void MappingWindow::OnClearFieldsPressed()
|
||||
m_controller->SetDefaultDevice(default_device);
|
||||
|
||||
m_controller->UpdateReferences(g_controller_interface);
|
||||
|
||||
GetController()->GetStateLock();
|
||||
emit ConfigChanged();
|
||||
emit Save();
|
||||
}
|
||||
|
Reference in New Issue
Block a user