diff options
| author | Tilka <tilkax@gmail.com> | 2020-02-09 01:37:30 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-09 01:37:30 +0000 |
| commit | 2e2540317e8752b8fe2e4d549a0b5c1ab1911041 (patch) | |
| tree | c5997fb92fc14a5dbbc061a5b572da18d0877e86 /Source/Core/DolphinQt/Config/Mapping/MappingWindow.cpp | |
| parent | 7fe11c95782a305e1e03a401e54d819700b39805 (diff) | |
| parent | 0a1634bedf17f7b27a3781d8e5ac6bafb20cd546 (diff) | |
Merge pull request #8417 from jordan-woyak/setting-expressions
InputCommon: Allow controller settings specified with input expresions.
Diffstat (limited to 'Source/Core/DolphinQt/Config/Mapping/MappingWindow.cpp')
| -rw-r--r-- | Source/Core/DolphinQt/Config/Mapping/MappingWindow.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/Core/DolphinQt/Config/Mapping/MappingWindow.cpp b/Source/Core/DolphinQt/Config/Mapping/MappingWindow.cpp index 2b38fea2aa..dd5768e3f2 100644 --- a/Source/Core/DolphinQt/Config/Mapping/MappingWindow.cpp +++ b/Source/Core/DolphinQt/Config/Mapping/MappingWindow.cpp @@ -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(); } |
