InputCommon: Allow Wii remote extension to be set with an input expression.

This commit is contained in:
Jordan Woyak
2020-01-18 11:19:32 -06:00
parent e8152b700f
commit 0a1634bedf
12 changed files with 172 additions and 64 deletions

View File

@ -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();
}