GLBasic - Hat Y Always Reads -1


Zuk

Member
Joined
Sep 23, 2010
Messages
108
In GLBasic, polling hat y always reads -1 for me. I've tried with a bluetooth paired iControlPad, which I realize doesn't use the hat. For some reason this value is returned if the iControlPad is connected or not. I've gotten the same results on two different Pandoras. All of the iControlPad buttons work perfectly.


My code in its current form polls for the hat or a mapped button, so either can be pressed with the same result. I'm getting bad results because hat y returns -1 and my code always thinks up is being pressed on a d-pad.


Just to clairfy, my code looks similar to this:


IF GETDIGY(self.GamePadNumber) = -1 OR GETJOYBUTTON(self.GamePadNumber, self.UpButton)


self.Up = TRUE


ELSE


self.Up = FALSE


ENDIF


I also wrote a small input tester program to verify and it is always returning -1.


I'm using the latest GLBasic update, 10.2something or other. I'm also running hotfix 7 (beta I think). Sorry, I don't have these devices with me right now.


I've posted over on the GLBasic forums too, because I don't really know if it's GLBasic or the Pandora code. Can anyone give me some advice or point me in the right direction?


My other post:


http://www.glbasic.com/forum/index.php?topic=7634.0


Thanks for your help!
 
Top