diff options
author | notaz | 2012-12-30 03:40:17 +0200 |
---|---|---|
committer | notaz | 2013-01-03 01:06:43 +0200 |
commit | c69642c80a8f3333354a589b5dabdb17f0f23e9b (patch) | |
tree | ecb6203f1cd372a473ad04bbbe6388bd8a215bd4 /libpcsxcore/cdrom.c | |
parent | fffad32e54d18c0a527a1e9eda0a746e2485284b (diff) | |
download | pcsx_rearmed-c69642c80a8f3333354a589b5dabdb17f0f23e9b.tar.gz pcsx_rearmed-c69642c80a8f3333354a589b5dabdb17f0f23e9b.tar.bz2 pcsx_rearmed-c69642c80a8f3333354a589b5dabdb17f0f23e9b.zip |
cdrom: keep savestate compat
Diffstat (limited to 'libpcsxcore/cdrom.c')
-rw-r--r-- | libpcsxcore/cdrom.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libpcsxcore/cdrom.c b/libpcsxcore/cdrom.c index 6923c02..78db291 100644 --- a/libpcsxcore/cdrom.c +++ b/libpcsxcore/cdrom.c @@ -1648,6 +1648,7 @@ int cdrFreeze(void *f, int Mode) { if (Mode == 0 && !Config.Cdda) CDR_stop(); + cdr.freeze_ver = 0x63647201; gzfreeze(&cdr, sizeof(cdr)); if (Mode == 1) { @@ -1672,6 +1673,14 @@ int cdrFreeze(void *f, int Mode) { if (!Config.Cdda) CDR_play(cdr.SetSectorPlay); } + + if ((cdr.freeze_ver & 0xffffff00) != 0x63647200) { + // old versions did not latch Reg2, have to fixup.. + if (cdr.Reg2 == 0) { + SysPrintf("cdrom: fixing up old savestate\n"); + cdr.Reg2 = 7; + } + } } return 0; |