naTmeg / ScriptedAmigaEmulator

Amiga Emulator in javascript and HTML5
332 stars 64 forks source link

HTML5 Gamepad API #18

Closed SpliFF closed 7 years ago

SpliFF commented 7 years ago

Changes to allow the use of physical game devices such as gamepads and joysticks on browsers that support the HTML5 Gamepad API.

To use a physical gamepad select "Joystick" for either port in Config->Ports. The existing emulated joystick can be selected by choosing "Emulated" from the same dropdown.

Tested on:

Known Issues:

These are all browser bugs so not much can be done about them.

naTmeg commented 7 years ago

Hi SpliFF, sorry for the delay. This looks interesting, I'll check it...

naTmeg commented 7 years ago

...nice work! I've extended some things, fixed problems (no call to cancelAnimationFrame(), malformed Joystick.button[]) and did some syntax-cosmetics. Also renamed 'Port 1/2' back to 'Mouse/Game', because this is printed on Amigas. I've finally also added the pointerLock-API, so I do an own commit.

Thanks for your time and work!