kootstra-rene / enge-js

eNGE JavaScript PlayStation Emulator
https://kootstra-rene.github.io/enge-js/
MIT License
233 stars 41 forks source link

Add gamepad support #4

Closed kootstra-rene closed 3 years ago

kootstra-rene commented 3 years ago

Add gamepad support for better usability/experience

zaykho commented 3 years ago

I'm working on it right now.

I'm making a setting overlay (pressing "escape" to toggle it) where we can set up the controls (pad and keyboard), the audio volume, the window size, loading by input the necessary file (bios and game) and finally, a FPS counter.

kootstra-rene commented 3 years ago

wow, one thing at the time. first just the controls, all the other things are different stories/issues which you can create if you want to. But this story is just gamepad support. Lets not start with feature creep on day one :-)

zaykho commented 3 years ago

he, he, he. :p

Ok, going for gamepad first.

zaykho commented 3 years ago

Made a quick version here.

Issues: Joystick aren't yet taken into account, the gamepad overwrite the keyboard, which mean that as soon a gamepad is connected the keyboard controls are not working anymore.

I'm not used with github so sorry if it's not properly made.

kootstra-rene commented 3 years ago

Thanks, I have taken the code and put it in gamepad.js and credited you. I did not create a pull request from you repo because it contained more changes then just the gamepad feature. It works like a charm with my gamepad.