mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-13 04:51:38 -10:00
A save or load state task still inside the core holds the close: the task calls the core's serialize, and the close unloads the library it lives in. CMD_EVENT_CORE_DEINIT and RARCH_CTL_MAIN_DEINIT split into a begin half (options, unpause, RAM state, the auto-save), a pending predicate and a finish half; the commands still wait between the halves, and the staged load returns to the frame loop between them, asking each frame, so the frames keep presenting "Saving state" and core_run's content_closing guard keeps retro_run out. The harness core carries a 64 MiB state so a save spans several checks; the lane closes content over one and counts the frames presented while the close waits.