the enum in SJoystickEvent currently assumes, that a Joystick will never have more than 6 Axes.
I have for example an Inertial Measuring Unit which has 7 Axes (3 for accelerometer and 4 for gyroscope).
So I had to change IEventReceiver.h a little bit: (I added some more Axes than necessary, propably someone else needs more)
Code: Select all
enum
{
NUMBER_OF_BUTTONS = 32,
AXIS_X = 0, // e.g. analog stick 1 left to right
AXIS_Y, // e.g. analog stick 1 top to bottom
AXIS_Z, // e.g. throttle, or analog 2 stick 2 left to right
AXIS_R, // e.g. rudder, or analog 2 stick 2 top to bottom
AXIS_U,
AXIS_V,
AXIS_6,
AXIS_7,
AXIS_8,
AXIS_9,
AXIS_10,
AXIS_11,
AXIS_12,
AXIS_13,
AXIS_14,
AXIS_15,
NUMBER_OF_AXES
};
Could somebody take a look at this please (also for other devices)?
I'm currently very busy, but when I port my project to windows I would at least do the windows fix.
(Btw: Has anybody tried Joysticks on android yet?)