mirror of https://github.com/PCSX2/pcsx2.git
SPU2-X: Update effects engine indexers when the effects area is moved and kept the same size. Not doing so caused SPU2 memory corruption in Sphinx and the Cursed Mummy and maybe others.
Save state compatibility broken. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5426 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
86e5f32efb
commit
8d07fdf165
|
@ -412,10 +412,11 @@ struct V_Core
|
|||
u32 ExtEffectsEndA;
|
||||
u32 ReverbX;
|
||||
|
||||
// Current size of the effects buffer. Pre-caculated when the effects start
|
||||
// Current size of and position of the effects buffer. Pre-caculated when the effects start
|
||||
// or end position registers are written. CAN BE NEGATIVE OR ZERO, in which
|
||||
// case reverb should be disabled.
|
||||
s32 EffectsBufferSize;
|
||||
u32 EffectsBufferStart;
|
||||
|
||||
V_CoreRegs Regs; // Registers
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ namespace Savestate
|
|||
|
||||
// versioning for saves.
|
||||
// Increment this when changes to the savestate system are made.
|
||||
static const u32 SAVE_VERSION = 0x000c;
|
||||
static const u32 SAVE_VERSION = 0x000d;
|
||||
|
||||
static void wipe_the_cache()
|
||||
{
|
||||
|
|
|
@ -265,10 +265,11 @@ void V_Core::UpdateEffectsBufferSize()
|
|||
//printf("too big, returning\n");
|
||||
//return;
|
||||
}
|
||||
if (newbufsize == EffectsBufferSize) return;
|
||||
if (newbufsize == EffectsBufferSize && EffectsStartA == EffectsBufferStart) return;
|
||||
|
||||
RevBuffers.NeedsUpdated = false;
|
||||
EffectsBufferSize = newbufsize;
|
||||
EffectsBufferStart = EffectsStartA;
|
||||
|
||||
if( EffectsBufferSize <= 0 ) return;
|
||||
|
||||
|
|
Loading…
Reference in New Issue