mirror of https://github.com/snes9xgit/snes9x.git
Copy internal registers to correct position (fixes #838)
This commit is contained in:
parent
691bc9fb49
commit
4e52321a53
|
@ -1595,9 +1595,11 @@ int S9xUnfreezeFromStream (STREAM stream)
|
||||||
// Copy saved internal registers to external registers
|
// Copy saved internal registers to external registers
|
||||||
const size_t new_dsp_registers_position = spc_block_size + 513;
|
const size_t new_dsp_registers_position = spc_block_size + 513;
|
||||||
|
|
||||||
memmove(local_apu_sound + spc_block_size + new_dsp_registers_position,
|
memmove(local_apu_sound + new_dsp_registers_position,
|
||||||
local_apu_sound + spc_block_size,
|
local_apu_sound + spc_block_size,
|
||||||
added_bytes_v12);
|
added_bytes_v12);
|
||||||
|
// the extra 0 byte between external registers and bytes_afterward is already present due to memset in S9xAPUSaveState
|
||||||
|
|
||||||
S9xAPULoadState(local_apu_sound);
|
S9xAPULoadState(local_apu_sound);
|
||||||
}
|
}
|
||||||
else if (version >= 12)
|
else if (version >= 12)
|
||||||
|
|
Loading…
Reference in New Issue