You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm running into an issue with gamepad buttons in Phaser 2.4.1 in both Firefox and Chrome (Windows 8.1 x64).
The error reported is:
Uncaught TypeError: Cannot read property 'altKey' of null
The error occurs in Phaser.DeviceButton.start. This seems to be because Phaser.SinglePad.processButtonDown passes null as the first argument of the start function, like so:
this._buttons[buttonCode].start(null,value);
This same issue is repeated in Phaser.SinglePad.processButtonUp:
this._buttons[buttonCode].stop(null,value);
This is my very first day working with Phaser, so I'm quite bashful to assume I know what I'm talking about, but I may be able to offer a resolution. I got my gamepad to work through a bit of guesswork; I simply passed the button reference in as the first argument of each of these function calls, and it seems to work. It looks a bit like this in my code now:
So far, so good, but I'm not very familiar with the codebase yet. Regardless, I hope this helps! I'll be sure to follow up if I run into any issues with my solution.
-zatch
The text was updated successfully, but these errors were encountered:
Hi there,
I'm running into an issue with gamepad buttons in Phaser 2.4.1 in both Firefox and Chrome (Windows 8.1 x64).
The error reported is:
Uncaught TypeError: Cannot read property 'altKey' of null
The error occurs in Phaser.DeviceButton.start. This seems to be because Phaser.SinglePad.processButtonDown passes null as the first argument of the start function, like so:
This same issue is repeated in Phaser.SinglePad.processButtonUp:
This is my very first day working with Phaser, so I'm quite bashful to assume I know what I'm talking about, but I may be able to offer a resolution. I got my gamepad to work through a bit of guesswork; I simply passed the button reference in as the first argument of each of these function calls, and it seems to work. It looks a bit like this in my code now:
So far, so good, but I'm not very familiar with the codebase yet. Regardless, I hope this helps! I'll be sure to follow up if I run into any issues with my solution.
-zatch
The text was updated successfully, but these errors were encountered: