shama/nodewebkit

GamePad

Closed this issue · 6 comments

Hi,

I'm having an issue with obtaining gamepad information. Using the following code..

var gamepadSupportAvailable = !!navigator.webkitGetGamepads || !!navigator.webkitGamepads;

        if (gamepadSupportAvailable) {

            var gamepads = navigator.getGamepads();

            for (var i = 0; i < gamepads.length; i++) {
                var pad = gamepads[i];

                console.log(pad);
           }

...pad is undefined. 'gamepads.length' is 4. This code is called every 100 milliseconds by the setInterval function. I have activated the controller by pressing buttons and moving the joySticks. This works in my Chrome browser.

Thanks in advance for any help you can give.

Cheers

No idea sorry. I recommend trying http://stackoverflow.com/

Hi Shama,

Interesting answer. Why should I go to stackoverflow and not ask you directly? This IS an issue with nodewebkit. Does it work for you? Has anyone else tried this that you know of?

This is an installer for node-webkit. I'm fairly certain the issue you're having with the gamepad API and node-webkit is not related to this installer. If you discover that it is then please let me know.

I have zero experience with the gamepad api but after a quick google search (because it sounded interesting) revealed some people having issues with node-webkit/gamepad and some saying it works.

I recommended stackoverflow.com because your question will more likely be resolved there.

Thanks Shama,

Looks like a Chromium issue. I can see other people have had the same issue. Sent question to Chromium people.

Confirmed to be a Chromium issue - bug raised at https://code.google.com/p/chromium/issues/detail?id=462546

👍