[haiku-commits] Re: r41882 - in haiku/trunk: headers/os/device src/kits/device

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

> On Fri, Jun 3, 2011 at 11:40 AM,  <mmlr@xxxxxxxx> wrote:
> > +                       status_t              
> >  GetButtonValues(bool* outButtons,
> > +                                                              
> > int32 forStick = 0);
>
> Would it perhaps make sense for the call to include a parameter
> indicating the size of the passed in outButtons array? It otherwise
> seems a bit risky to assume it was the correct size for the number of
> available buttons.

This just generally follows the BJoystick API, it's the same for
GetAxisValues and GetHatValues. They're supposed to be called with
arrays of Count*() elements each. Size arguments could be added of
course, though it seems a bit redundant.

Regards
Michael

Other related posts: