Warning removed
This commit is contained in:
@@ -114,7 +114,7 @@ void Joystick::processEvents()
|
||||
buttonRepeatTimers[i].restart();
|
||||
}
|
||||
else if (autoRepeat && changed != 0) {
|
||||
if ( buttonRepeatTimers[i].elapsed() >= autoRepeatDelay ) {
|
||||
if (buttonRepeatTimers[i].elapsed() >= autoRepeatDelay) {
|
||||
emit buttonValueChanged(i, (bool) changed);
|
||||
buttons[i] = changed;
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#include <QObject>
|
||||
#include <QMap>
|
||||
#include <QTime>
|
||||
#include <QElapsedTimer>
|
||||
#include <QTimer>
|
||||
#include <QStringList>
|
||||
#include <SDL.h>
|
||||
@@ -66,9 +66,9 @@ class Joystick : public QObject
|
||||
QMap<int, Sint16> axes;
|
||||
QMap<int, Uint8> buttons;
|
||||
QMap<int, Uint8> hats;
|
||||
QMap<int, QTime> axisRepeatTimers;
|
||||
QMap<int, QTime> buttonRepeatTimers;
|
||||
QMap<int, QTime> hatRepeatTimers;
|
||||
QMap<int, QElapsedTimer> axisRepeatTimers;
|
||||
QMap<int, QElapsedTimer> buttonRepeatTimers;
|
||||
QMap<int, QElapsedTimer> hatRepeatTimers;
|
||||
|
||||
signals:
|
||||
void axisValueChanged(int axis, int value);
|
||||
|
||||
Reference in New Issue
Block a user