mirror of
https://github.com/mineracks/seedhammer-v1-companion.git
synced 2026-06-26 20:51:06 +10:00
Eject button wasn't taking effect immediately because Platform.Events() was blocked in a select that only woke on button-channel input or timer expiry. SDCardEvents go through a separate pending queue and the select had no way to notice when they arrived — the eject sat in pending until the next button press or timer expiry, both of which could take seconds. Fix: 1-buffered wake channel. signalWake() pokes it (non-blocking), the select now reads from it as a third case, and the drain-loop at the end re-drains pending so any event pushed while we waited gets returned in the same call. exportSetSDCard() calls signalWake() after appending to pending. Wakeup() (gui.Platform method, previously no-op) now also calls it, so any future gui-side wake request works the same way. The bug was specific to non-button events — button events go through the events chan directly so they always woke the select. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| combined-sim | ||
| composer | ||
| emulator | ||
| seedsigner-sim | ||
| sh1e-decode | ||