GLBasic - Hat Y Always Reads -1


Sep 23, 2010
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


self.Up = FALSE


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:

Thanks for your help!