Do the joystick commands only work in windowed mode?
It should work. Looks like a bug. Can confirm when I put my game full screen the joystick no longer responds.
Move to Bug-Reports ;)
ok, I'll take a look at it. Thx for mentioning. I don't use fullscreen at all, that's why sometimes these things happen.
It definitely works in fullscreen.Tested on three different Windows Pc's.:D
Cheers
Doesn't work here. I'm on Windows Vista.
Just thought, are you using JOYSTATE or GETJOY... ? I think (if I remember correctly) I am using GETJOY as it returns a values for analogue sticks. JOYSTATE only returns digital values doesn't it? Maybe one works and the other doesn't. Otherwise maybe it's a problem related with XP v Vista etc?
JOYSTATE returns (should at least) GETJOYX(0), GETJOYY(0), GETJOYB(0,0), GETJOYB(0,1).
I'll take a look at that when I'm home tonight, maybe.
SETSCREEN 640,480,0
LIMITFPS 60
GLOBAL jx, jy, ba,bb
WHILE TRUE
JOYSTATE jx,jy,ba,bb
PRINT "JoyState x="+ jx+", y="+jy,0,0
jx = GETJOYX(0)
jy = GETJOYY(0)
PRINT "Get Joy x="+ jx+", y="+jy,0,10
SHOWSCREEN
WEND
Run that (window). Both methods return a value. JOYSTATE only returns 0, -1 or +1 for the x and y. GETJOYX / Y return any value from -1.0 to +1.0 as an analogue value.
Change the code so SET SCREEN is full screen and run.
Joystate x=0, y=-35826
Get Joy x=1, y=1
And the values never change.
I'm on Vista, with a Thrustmaster rumble type USB joystick (resembles a PS2 joypad).
Oh dear. I guess i found the bug.:D
Do not use the SETSCREEN command for fullscreen. Go to Project/Options and change it to fullscreen.
Gernot, now it's your turn. :D
Cheers
Well Gernot keeps saying not to use the setscreen command, set it in the project options, mabe he knows something we don´t? :-)
No, I don't say "do not use it". I just suggest not using it when appropriable. It must work, however. Bug, I'm about to fix it.
Fixed? - uploading Update.
Works for me now. Thanks.
Yes it now works for me as well.
I have to swap between fullscreen and windowed depending on which of the kids pc i'm running the program on.
Thanks for your help.