Fix gamepad support

Thanks @JasonWoof
This commit is contained in:
Will Scullin 2021-02-15 17:55:46 -08:00
parent 3f966ad608
commit 1923d7a71c
No known key found for this signature in database
GPG Key ID: 26DCD1042C6638CD
1 changed files with 2 additions and 0 deletions

View File

@ -7,6 +7,7 @@ import { debug } from './util';
import SYMBOLS from './symbols';
import { Restorable } from './types';
import { processGamepad } from './ui/gamepad';
interface Options {
characterRom: any,
@ -142,6 +143,7 @@ export class Apple2 implements Restorable<State> {
this.stats.frames++;
this.io.tick();
this.tick();
processGamepad(this.io);
if (!this.paused && requestAnimationFrame) {
this.runAnimationFrame = requestAnimationFrame(runFn);