diff --git a/Source/Core/DolphinQt/Config/Mapping/MappingWidget.h b/Source/Core/DolphinQt/Config/Mapping/MappingWidget.h index 0ec5227f34..ee05834736 100644 --- a/Source/Core/DolphinQt/Config/Mapping/MappingWidget.h +++ b/Source/Core/DolphinQt/Config/Mapping/MappingWidget.h @@ -27,8 +27,6 @@ class NumericSettingBase; enum class SettingVisibility; } // namespace ControllerEmu -constexpr int INDICATOR_UPDATE_FREQ = 30; - class MappingWidget : public QWidget { Q_OBJECT diff --git a/Source/Core/DolphinQt/Config/Mapping/MappingWindow.cpp b/Source/Core/DolphinQt/Config/Mapping/MappingWindow.cpp index a41920e2c1..d5af344c30 100644 --- a/Source/Core/DolphinQt/Config/Mapping/MappingWindow.cpp +++ b/Source/Core/DolphinQt/Config/Mapping/MappingWindow.cpp @@ -10,12 +10,12 @@ #include #include #include +#include #include #include #include #include -#include "Core/Core.h" #include "Core/HotkeyManager.h" #include "Common/CommonPaths.h" @@ -73,12 +73,15 @@ MappingWindow::MappingWindow(QWidget* parent, Type type, int port_num) SetMappingType(type); const auto timer = new QTimer(this); - connect(timer, &QTimer::timeout, this, [this] { + connect(timer, &QTimer::timeout, this, [this, timer] { + const double refresh_rate = screen()->refreshRate(); + timer->setInterval(1000 / refresh_rate); + const auto lock = GetController()->GetStateLock(); emit Update(); }); - timer->start(1000 / INDICATOR_UPDATE_FREQ); + timer->start(100); const auto lock = GetController()->GetStateLock(); emit ConfigChanged();