Boot: input grace period; persist high score + volume via NVS
- Ignore all input for ~1.2 s after power-up/reset (INPUT_GRACE_MS): the keyboard controller can emit stale bytes and pins can float, which used to start a game right after a restart. - High score + volume survive power cycles: Preferences (NVS, 'mc' namespace) loaded in setup(), saved on game over and on every volume key (U/V/M). arduino-esp32 commits NVS in end(), so savePrefs() does putUInt x2 + end() + begin() reopen. - SoundEngine::setVolume() restores a saved level (0 = stay muted, lastVol_ keeps unmute working). - Emulator: file-backed Preferences shim (mc-prefs.cfg, gitignored) so persistence is testable on the desktop.
This commit is contained in:
@@ -8,3 +8,4 @@ config
|
||||
emulator/missilecommand-emu
|
||||
emulator/seq*.bmp
|
||||
|
||||
emulator/mc-prefs.cfg
|
||||
|
||||
Reference in New Issue
Block a user