Bare minimum fix gpgx lazystates rewinder
This was a lazystates regression -- after lazystates, there is no longer any knowledge in the core of how big the state will be
This commit is contained in:
parent
aa48af9c94
commit
0326bf63d3
src/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64
|
@ -39,23 +39,12 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx
|
|||
|
||||
public byte[] SaveStateBinary()
|
||||
{
|
||||
if (_stateBuffer != null)
|
||||
{
|
||||
using var stream = new MemoryStream(_stateBuffer);
|
||||
using var writer = new BinaryWriter(stream);
|
||||
SaveStateBinary(writer);
|
||||
writer.Flush();
|
||||
writer.Close();
|
||||
return _stateBuffer;
|
||||
}
|
||||
|
||||
using var ms = new MemoryStream();
|
||||
using var bw = new BinaryWriter(ms);
|
||||
SaveStateBinary(bw);
|
||||
bw.Flush();
|
||||
_stateBuffer = ms.ToArray();
|
||||
bw.Close();
|
||||
return _stateBuffer;
|
||||
ms.Close();
|
||||
return ms.ToArray();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue