Files
ppsspp/libretro
AlemarandClaude Opus 4.8 821c5b4534 libretro: restore emu-thread pause handshake to fix serialize deadlock
c42a3f070a removed PAUSE_REQUESTED, which turned the acknowledge-wait in
EmuThreadPause() into dead code: emuThreadState is set to PAUSED on the line
above the `while (emuThreadState != PAUSED)` poll, so pause returns without the
emu thread parked at a frame boundary. retro_serialize / retro_unserialize then
race the GL ThreadFrame handshake and can deadlock the emu thread under periodic
save-states.

Restore the minimal handshake: EmuThreadPause() requests the pause, the emu
thread transitions PAUSE_REQUESTED -> PAUSED at its own frame boundary, and
retro_run treats the request window as paused. START_REQUESTED stays removed and
the new shutdown path is untouched.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-25 03:08:31 -06:00
..
2022-11-24 12:42:38 -04:00