lightrec: Fix save states
authorPaul Cercueil <paul@crapouillou.net>
Mon, 25 Apr 2022 20:28:54 +0000 (21:28 +0100)
committerPaul Cercueil <paul@crapouillou.net>
Mon, 25 Apr 2022 20:32:09 +0000 (21:32 +0100)
commit6962f77077fe33ba7c650264f9930e1899901659
tree2e30cb5f6051ef52297c5e685bfbdefd74b846db
parent065ff7f4ff24dbad02bce5ba407c0dad66bf5acb
lightrec: Fix save states

To create save states the psxRegs variable must be up-to-date. Therefore
we need to store back all the registers in Lightrec's cache into psxRegs
before saving, and reload them into Lightrec's cache after loading a
save state.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
libpcsxcore/lightrec/plugin.c
libpcsxcore/misc.c
libpcsxcore/r3000a.h