瀏覽代碼

Increase the initial auto-repeat timer with 150msec

This allows us a bit more time to release the button before the auto-repeat events occur. This might fix some issues with events triggering to quickly.
Tobias Hieta 8 年之前
父節點
當前提交
a0d9427ebe
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/input/InputComponent.cpp

+ 2 - 2
src/input/InputComponent.cpp

@@ -25,6 +25,7 @@
 #endif
 
 #define LONG_HOLD_MSEC 500
+#define INITAL_AUTOREPEAT_MSEC 650
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 InputComponent::InputComponent(QObject* parent) : ComponentBase(parent), m_autoRepeatCount(0)
@@ -49,7 +50,6 @@ bool InputComponent::addInput(InputBase* base)
   //
   connect(base, &InputBase::receivedInput, this, &InputComponent::remapInput);
 
-
   // for auto-repeating inputs
   //
   m_autoRepeatTimer = new QTimer(this);
@@ -207,7 +207,7 @@ void InputComponent::remapInput(const QString &source, const QString &keycode, b
   }
 
   if (!m_autoRepeatActions.isEmpty())
-    m_autoRepeatTimer->start(500);
+    m_autoRepeatTimer->start(INITAL_AUTOREPEAT_MSEC);
 
   if (!queuedActions.isEmpty())
   {