From d029c7ed15e705db76e86037f8678fef89a6eaa5 Mon Sep 17 00:00:00 2001 From: Paul Irish Date: Mon, 6 Aug 2012 11:38:16 -0700 Subject: [PATCH] Update feature-detects/gamepad.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit removing navigator.gamepads check and adding notes.  --- feature-detects/gamepad.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/feature-detects/gamepad.js b/feature-detects/gamepad.js index 1f775d5180..0756289d9a 100644 --- a/feature-detects/gamepad.js +++ b/feature-detects/gamepad.js @@ -2,5 +2,11 @@ // https://dvcs.w3.org/hg/gamepad/raw-file/default/gamepad.html // By Eric Bidelman -Modernizr.addTest('gamepads', !!Modernizr.prefixed('gamepads', navigator) || - !!Modernizr.prefixed('getGamepads', navigator)); +// FF has Gamepad API support only in special builds, but not in any release (even behind a flag) +// Their current implementation has no way to feature detect, only events to bind to. +// http://www.html5rocks.com/en/tutorials/doodles/gamepad/#toc-featuredetect + +// but a patch will bring them up to date with the spec when it lands (and they'll pass this test) +// https://bugzilla.mozilla.org/show_bug.cgi?id=690935 + +Modernizr.addTest('gamepads', !!Modernizr.prefixed('getGamepads', navigator));