Joypad+glfw issues

Monkey Forums/Monkey Bug Reports/Joypad+glfw issues

Oddball(Posted 2013) [#1]
Hi, I'm trying some joypad stuff again now it's been added to glfw, but have found a few issues. I'm assuming the xbox controller as a base as that appears to be most popular at the moment. On the mac the button constants don't match their windows equivalents. Also there are three buttons available on the mac and two on windows that have no constant for them; LSB, RSB, and on mac GUIDE. Instead of just dumping this problem here I've took it upon myself to map out the correct button codes below.
#If HOST="macos" And TARGET="glfw"
Const JOY_A=11
Const JOY_B=12
Const JOY_X=13
Const JOY_Y=14
Const JOY_LB=8
Const JOY_RB=9
Const JOY_BACK=5
Const JOY_START=4
Const JOY_LSB=6
Const JOY_RSB=7
Const JOY_LEFT=2
Const JOY_UP=0
Const JOY_RIGHT=3
Const JOY_DOWN=1
Const JOY_GUIDE=10

#Elseif HOST="winnt" And TARGET="glfw"
Const JOY_A=0
Const JOY_B=1
Const JOY_X=2
Const JOY_Y=3
Const JOY_LB=4
Const JOY_RB=5
Const JOY_BACK=6
Const JOY_START=7
Const JOY_LSB=8
Const JOY_RSB=9
'These buttons don't have a value on winnt with glfw
Const JOY_LEFT=10
Const JOY_UP=11
Const JOY_RIGHT=12
Const JOY_DOWN=13
Const JOY_GUIDE=14

#Else
Const JOY_A=0
Const JOY_B=1
Const JOY_X=2
Const JOY_Y=3
Const JOY_LB=4
Const JOY_RB=5
Const JOY_BACK=6
Const JOY_START=7
Const JOY_LEFT=8
Const JOY_UP=9
Const JOY_RIGHT=10
Const JOY_DOWN=11
Const JOY_LSB=12
Const JOY_RSB=13
Const JOY_GUIDE=14

#End

If people could test them for me. Also I don't have xna so I have no idea of the LSB/RSB codes for winnt+xna or xbox+xna. If someone could add them that would be great.

finally if you are adding these to input.monkey yourself then you'd want to change the corresponding KEY_JOY0 constants too.