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

Support game pads #19

Closed
bfirsh opened this issue Sep 11, 2017 · 1 comment
Closed

Support game pads #19

bfirsh opened this issue Sep 11, 2017 · 1 comment

Comments

bolinfest added a commit to bolinfest/jsnes-web that referenced this issue Feb 6, 2018
This addresses bfirsh#19 and is
based off of a prototype I made over four years ago:
bolinfest/jsnes@91daafe.

On startup, the webapp checks to see if there are any connected
Gamepads. If so, it elects to use a `GamepadController` instead of a
`KeyboardController`. If the Gamepads get disconnected over the
lifetime of the webapp, the current implementation waits for the
Gamepads to be reconnected, though it would be more elegant if it fell
back on the `KeyboardController` in this case.

Note the mapping of the buttons is currently hardcoded. Ideally, there
would be a GUI with a picture of the controller, highlighting one
button at a time, giving the user the chance to press the corresponding
button on their controller to establish the mapping. As a stopgap, we
could also let users do this programmatically by stuffing values in
`localStorage` because it will probably be a bit of work to create the
GUI.
@bfirsh
Copy link
Owner Author

bfirsh commented Jan 10, 2019

Fixed in #164

@bfirsh bfirsh closed this as completed Jan 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant