Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setJoypadState is inconsistent #375

Open
bonkrat opened this issue Jan 9, 2024 · 0 comments
Open

setJoypadState is inconsistent #375

bonkrat opened this issue Jan 9, 2024 · 0 comments

Comments

@bonkrat
Copy link

bonkrat commented Jan 9, 2024

setJoypadState is not consistently updating the WasmBoy instance. For example, something like:

setInterval(async () => {
  WasmBoy.setJoypadState({
    ...getInitialJoypadState(),
    UP: true
  })
}, 500)
Screencast.from.2024-01-08.21-57-22.webm

will process correctly sometimes. I haven't been able to figure out why it's dropping some of the input here. Maybe I'm not using it correctly though. Is there a suggested way to use setJoypadState with the Lib API? Or should it only be used with executeFrame to guarantee that it is set between each frame?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant