GLFW: JoyY() bug/typo?

Monkey Forums/Monkey Bug Reports/GLFW: JoyY() bug/typo?

mr_twister(Posted 2013) [#1]
MY PROBLEM:
I just tried the joystick functions JoyX() And JoyY() and (although they totally use my currently connected joystick (Genius. axes=2, buttons=8)) the Y axis seems inverted to me.


THE SOLUTION:
I checked the mojo code for JoyY() and to my surprise this is what the code looks like:
float gxtkInput::JoyY( int index ){
	switch( index ){
	case 0:return joyPos[1];
	case 1:return -joyPos[4];
	}
	return 0;
}


Note that a sign change is performed on the second joystick but not for the first. Making the same sign change on the first case solves the issue for me.

So the function now reads:
float gxtkInput::JoyY( int index ){
	switch( index ){
	case 0:return -joyPos[1];
	case 1:return -joyPos[4];
	}
	return 0;
}


Given that the sign change is being performed for JOY1 it only makes sense to perform the same operation on JOY0.

Well, there's always the possibility that only my controller requires that (and for other people the second joystick needs to be inverted while the first does not) though...


mr_twister(Posted 2013) [#2]
I would really appreciate some feedback on this. Is anyone else having the same issue? (inverted Y axis).

Is this a bug or a thing of my controller only?

No one else working with gamepads on GLFW here?