kripken/emscripten — pull request #2707 by crazyjul (2014-08-23 23:38:31+00:00)
Title: Fix emscripten_get_(num_gamepads|gamepad_status) for Chrome

Chrome does not completely follows the specifications for Gamepads. It always returns an array of 4 elements, undefined if no pad is connected.

This fix handles gamepads array with undefined elements