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

[Request] Gamepad Support #23

Open
pc0hidq opened this issue Jun 1, 2019 · 1 comment
Open

[Request] Gamepad Support #23

pc0hidq opened this issue Jun 1, 2019 · 1 comment

Comments

@pc0hidq
Copy link

pc0hidq commented Jun 1, 2019

Hi,

I don't really know anything about coding but I have been using gb studio which bundled gameboy-online for it's weblauncher. I put out a small game using it but a lot of people were very confused by the lack of gamepad support.

I have a feeling that this code set will be used by many more people in the future. Would it be possible to add gamepad support? Are there any alternative html5 emulators that do this?

@bbbbbr
Copy link

bbbbbr commented Oct 13, 2019

If you don't mind using a fork, I've modified the version packaged with GB Studio to use the html5 gamepad API.

https://github.com/bbbbbr/gb-studio/tree/develop/appData/js-emulator

To use it outside of GB Studio you'd want to change this one line in js/other/controls.js
(or fully define customControls in index.html)

FROM: var keys = customControls[key] ? customControls[key] : defaultKeys[key];
TO: var keys = defaultKeys[key];

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

2 participants