Guard against out-of-bounds axes/buttons in joystick access
Guard against out-of-bounds axes/buttons in joystick access

Some controllers may not have all the buttons or axes supported, so do a
range check to prevent out-of-bounds access. Assume button 0 (A) and
axes 0 and 1 are always available without checking. But some
controllers may lack buttons, for example, same controller I'm testing
with on the web has 12 buttons, the latter for the directional pad, but
only 8 buttons with native glfw, so guard against this. Some joysticks
may also only have one set of axes?

satoshinm/NetCraft,satoshinm/NetCraft,satoshinm/NetCraft,satoshinm/NetCraft,satoshinm/NetCraft