fengb / fundude

Gameboy emulator: Zig -> wasm
https://fengb.github.io/fundude/
MIT License
180 stars 8 forks source link

Remove pause in background? #33

Closed fengb closed 4 years ago

fengb commented 4 years ago

As a requestAnimationFrame() quirk, we automatically inherited pausing on the background (see https://github.com/facebook/react/issues/11171#issuecomment-357945371 for more info). As a workaround for on resume "RUN EVERYTHING", I capped it to 5 seconds of catchup.

I don't think we should pause on the background. If we really wanted pause, we should enable a set of meta controls outside of the emulator (e.g. expose the debug controls).

If we're not pausing, we should have a separate callback to fire .spin() that's not dependent on the draw loop.

fengb commented 4 years ago

Closed via https://github.com/fengb/fundude/commit/8e72b7d3fb4aeebc2480cd97497ccf995d1d5fca