Adapted gamepad plugin to work with new API