GameBoy-Online icon indicating copy to clipboard operation
GameBoy-Online copied to clipboard

[Request] Gamepad Support

Open pc0hidq opened this issue 6 years ago • 1 comments

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?

pc0hidq avatar Jun 01 '19 11:06 pc0hidq

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];

bbbbbr avatar Oct 13 '19 14:10 bbbbbr