Add joystick / gamepad support using distribution html files #23
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
I noticed this version of the emulator had no joystick / gamepad support, but the WASM version did. So i added joystick / gamepad support to the distribution html files for this version of the emulator.
I keep using RequestAnimationFrame to handle joypad input and i only reset the joypad button state once after not pressing any buttons / axises. If i did not do this keyboard and touch input had problems.
This allowed me to use the emulator on my arcade cabinet as well as on the steamdeck as you can see in the video's below. (basically i used chrome / edge with local html files and made the bin= variable from within the frontends. I also had to disable websecurity to go around CORS issues from loading files using file:// protocol but this is not a problem as everything is done locally
2022-06-19.23-54-11.mp4
2022-06-20.02-00-53.mkv.mp4