I don't know if this is an issue with the Open Pandora or with GLBasic. When I compile for the Pandora, joystick hat y always always returns a value of -1. I am using the iControlPad (which doesn't use a hat, the d-pad registers as buttons). The same program compiled for windows works correctly. I have gotten the same results on two separate Pandora handhelds. I'm using the latest GLBasic update and Pandora firmware hotfix 7. I looked around but I haven't found any info on this issue. Any help would be greatly appreciated.
Thanks!
how did you connect the iControlPad? As a Joypad in bluethooth mode?
Can you enumerate all joypads in the system (GETNUMJOY) and their name?
Yes, I am connecting the iContolPad as a joypad in bluetooth mode. What I see is that if no joypad is connected the joystick 0 name is "gpio-keys" and hat y is always -1. If I connect the iControlPad it becomes joystick 0, also with hat y value of -1.
I'd like to support multiple kinds of game pads, so 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
Because I poll both the hat and an assignable button (because the iControlPad doesn't have a hat) my code always thinks up is being pressed.
I started a thread over on the Pandora forums, but I haven't gotten any bites there:
http://boards.openpandora.org/index.php?/topic/7043-glbasic-hat-y-always-reads-1/
Thanks!
Very strange. I'm just using plain SDL-input for the Pandora.