Skip to content

Commit f007a77

Browse files
committed
Fixed Gamepad issue that incorrectly checked non-webkit prefix gamepads.
1 parent cd96324 commit f007a77

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ Version 2.0.6 - "Jornhill" - -in development-
6969

7070
* Sprite.alive property now explicitly defined on the Sprite prototype (thanks @lewster32, #841)
7171
* BitmapData.resize now properly updates the baseTexture and texture dimensions.
72+
* Fixed Gamepad issue that incorrectly checked non-webkit prefix gamepads.
7273

7374
### Migration Guide
7475

src/input/Gamepad.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ Phaser.Gamepad.prototype = {
226226
*/
227227
_pollGamepads: function () {
228228

229-
var rawGamepads = navigator.getGamepads || (navigator.webkitGetGamepads && navigator.webkitGetGamepads()) || navigator.webkitGamepads;
229+
var rawGamepads = navigator.getGamepads() || (navigator.webkitGetGamepads && navigator.webkitGetGamepads()) || navigator.webkitGamepads;
230230

231231
if (rawGamepads)
232232
{

0 commit comments

Comments
 (0)