Skip to content

setJoypadState is inconsistent #375

@bonkrat

Description

@bonkrat

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions