On Sat, Apr 20, 2013 at 10:31 PM, Todd Showalter <[email protected]> wrote:

    I hate it when I fat-finger send.

    The data just needs to be something like:

typedef struct
{
   float x;
   float y;
} VEC2;

typedef struct
{
  VEC2 l_stick;
  VEC2 r_stick;
  float    l_shoulder;
  float    r_shoulder;
  uint64_t  buttons;
} GAMEPAD_DATA;

    That's a complete controller state in 32 bytes.  The analog values
in actual hardware are usually actually returned as unsigned byte
values, but from a protocol point of view converting each stick axis
to the range [-1.0f .. 1.0f] and the triggers to [0.0f .. 1.0f] is
saner.  If Wayland just delivers that data it will cover most needs.

                                          Todd.

--
 Todd Showalter, President,
 Electron Jump Games, Inc.
_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to