[haiku-commits] Re: r41851 - haiku/trunk/src/add-ons/kernel/drivers/input/usb_hid

  • From: "Michael Lotz" <mmlr@xxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 03 Jun 2011 17:46:41 +0200

> Michael Lotz<mmlr@xxxxxxxx> wrote:
> > Right now they are returned with "uint32 BJoystick::ButtonValues()" 
> > which just returns the uint32.
> 
> While not as flexible as the boolean ButtonValue() method, one could 
> also just change the return value to uint64; that would even work around 
any compatibility issues (or both).

Indeed one could do that, but it'd be at best a workaround until the 
next limit is reached...

I've introduced a GetButtonValues() method now that behaves the same as 
all the other getters, so it fits nicely into the BJoystick API. The 
only drawback is that it has a larger memory overhead. On the plus side 
the app developer doesn't need to care about interpreting a bitmask 
which simplifies things a bit there.

Regards
Michael

Other related posts: