cdrom: handle old savestates better
authornotaz <notasas@gmail.com>
Tue, 23 Dec 2014 23:18:16 +0000 (01:18 +0200)
committernotaz <notasas@gmail.com>
Tue, 23 Dec 2014 23:18:16 +0000 (01:18 +0200)
I still have to many of them and use them for testing..

libpcsxcore/cdrom.c

index 38fecf7..b686855 100644 (file)
@@ -1514,6 +1514,12 @@ int cdrFreeze(void *f, int Mode) {
                                SysPrintf("cdrom: fixing up old savestate\n");
                                cdr.Reg2 = 7;
                        }
+                       // also did not save Attenuator..
+                       if ((cdr.AttenuatorLeftToLeft | cdr.AttenuatorLeftToRight
+                            | cdr.AttenuatorRightToLeft | cdr.AttenuatorRightToRight) == 0)
+                       {
+                               cdr.AttenuatorLeftToLeft = cdr.AttenuatorRightToRight = 0x80;
+                       }
                }
        }