fix scrambeled axis/buttons indices

This commit is contained in:
Mathias Panzenböck
2016-04-03 00:20:59 +02:00
parent 5af554723d
commit 017f2229ce
6 changed files with 19 additions and 15 deletions

View File

@ -57,13 +57,14 @@ class Axis : public QObject {
//recalculates the gradient curve. This should be run every time
//maxSpeed, xZone, or dZone are changed.
void adjustGradient();
int axisIndex() const { return index; }
protected:
int tick;
//This axis is logically depressed (positive or negative)
//if the axis is gradient, this is true even if it is not
//currently generating a keypress at the instant.
bool isOn;
//which joystick this actually is
//the index of this axis on the joystick
int index;
//actually sends key events. Press is true iff the key
//is to be depressed as opposed to released.