We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5e97f10 commit 9ede913Copy full SHA for 9ede913
1 file changed
src/input/Gamepad.js
@@ -252,6 +252,11 @@ Phaser.Gamepad.prototype = {
252
*/
253
_pollGamepads: function () {
254
255
+ if (!this._active)
256
+ {
257
+ return;
258
+ }
259
+
260
if (navigator['getGamepads'])
261
{
262
var rawGamepads = navigator.getGamepads();
@@ -291,6 +296,11 @@ Phaser.Gamepad.prototype = {
291
296
}
292
297
293
298
299
+ for (var g = 0; g < this._gamepads.length; g++)
300
301
+ this._gamepads[g]._rawPad = this._rawPads[g];
302
303
294
304
if (gamepadsChanged)
295
305
306
var validConnections = { rawIndices: {}, padIndices: {} };
0 commit comments