Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gamepad API stopped working as of NW.js 0.33 #6792

Closed
AshleyScirra opened this issue Sep 13, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@AshleyScirra
Copy link

commented Sep 13, 2018

NWJS Version : 0.33.0 - 0.33.2
Operating System : Windows 10 x64

Sample package.nw: https://www.dropbox.com/s/6y74d9e7f479pq4/package.nw?dl=0

Expected behavior

The gamepad API worked in NW.js 0.32 and before, but seems to have stopped working in NW.js 0.33.

Actual behavior

As of NW.js 0.33, navigator.getGamepads() returns nothing even if you have a gamepad connected and press buttons on it. It still works in Chrome. It also works in NW.js if you simply load http://html5gamepad.com/ in NW.js, so the problem seems specific to using the gamepad API in a local packaged app.

How to reproduce

Drop the linked package.nw in to a fresh download of NW.js 0.33.x and run it. Press a button on a gamepad; it should indicate the gamepad name and allow you to control the space ship. Instead nothing happens. Press F12 and run navigator.getGamepads() - it returns an empty list.

@rogerwang

This comment has been minimized.

Copy link
Member

commented Sep 14, 2018

This is fixed in git and will be available in the next nightly build.

@rogerwang rogerwang closed this Sep 14, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.