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