mirror of
https://github.com/rommapp/romm.git
synced 2026-11-30 18:42:34 +01:00
Render through a packed-RGBA palette lookup and a 32-bit pixel view, so a paint is two stores per framebuffer byte instead of eight clamped byte writes, and rebind the heap views only when wasm memory grows. Separate `advance` from `render` so a catch-up tick emulates several frames but paints once, rather than discarding up to two full frames of pixel work exactly when the machine is already behind. Load the runtime and fetch the cart in parallel, reuse one input struct instead of allocating per step, and skip disconnected gamepads, whose stale analog values press buttons on their own in Firefox (#3851). Replace the hand-rolled liveness flag with useIsAlive, take the canvas geometry and the canvas background token from their existing homes, and move the pad, axis and mouse-button mappings next to the keyboard map. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>