whscullin / apple2js

An Apple II emulator originally written in Javascript, now being converted to TypeScript
http://www.scullinsteel.com/apple2/
MIT License
442 stars 57 forks source link

Gamepad support seems to have been removed in a refactor (so presumably not on purpose) #57

Closed JasonWoof closed 3 years ago

JasonWoof commented 3 years ago

Thank you for this amazing program! It's been a delight to play some of my childhood video games without having to install anything or fiddle with setup.

One of the games I wanted to play only works with the joystick though, and that didn't seem to work, so I took a look at the source code.

I found the function processGamepad really easily, but it wasn't being called anywhere.

Looks like it was removed in a refactor (commit bcbe36db0c) presumably by accident.

I added a call to processGamepad() right after this.tick() and that worked great for me when I did a build and opened up apple2js.html

Patch: re-enable-joystick.txt

whscullin commented 3 years ago

Whoops! Thank you for catching that. I've applied your patch.

JasonWoof commented 3 years ago

Huzzah! Thanks :)