bfirsh / jsnes

A JavaScript NES emulator.
https://jsnes.org
Apache License 2.0
6.12k stars 831 forks source link

Why do I call nes.buttonDown(1, jsnes. Controller. Button_SELECR) in button events does not work? #383

Closed 849029780 closed 3 years ago

849029780 commented 3 years ago

Using the touchstart event to call other operation events does not workNS@YCR[CQ%B64NM82]X`HNF(1).png

849029780 commented 3 years ago

Can successfully load ROM, and there are pictures and sounds, but I can't operate game characters, PC browser and phone browser can't work

849029780 commented 3 years ago

I use the jsnes.mini.js library. I tried to change the example, but still couldn't operate the game. I entered nes.buttonDown (1, jsnes. Controller. BUTTONSTART) in the browser command console It works occasionally, but it is uncertain

849029780 commented 3 years ago

I'm sorry, it's my code problem. ButtonDown and buttonUp are not used at the same time. This problem has been solved