Does JoyButtonCaps() return contiguous buttons?

BlitzMax Forums/BlitzMax Programming/Does JoyButtonCaps() return contiguous buttons?

Russell(Posted 2012) [#1]
That is, if a controller has, say, 4 buttons, is the returned bitfield going to be "00000000000000000000000000001111" or could it be something like "10000000000100001000000000000010"? I always look through the whole bitfield just to be sure, but was just wondering.

I guess it must be different in some cases, otherwise it wouldn't make sense for JoyButtonCaps() to return a bitfield instead of just the number of buttons available on the controller, right?

Russell


Russell(Posted 2012) [#2]
Anybody?

I only have one controller to test with, but was wondering if they are all the same, as far as how they return the bitfield. But it does beg the question, "Why doesn't JoyButtonCaps() just return the number of available buttons if the bits returned are always going to be 'in order'?". I mean, if the number returned is 8, then I would know that buttons 0 through 7 are available.

It'd be weird if there were some skipped bits in there, unless the bits refer to a physical 1-to-1 relationship to a data line (direct hardware) of the controller/port.

Just wondering...

Russell