BinaryStateSaver - detangle version lump handling
This commit is contained in:
parent
818748adce
commit
33696eb5df
|
@ -328,15 +328,15 @@ namespace BizHawk.Client.Common
|
|||
sw.Flush();
|
||||
}
|
||||
|
||||
public BinaryStateSaver(string path, bool notamovie = true) // notamovie is hack, really should have separate something
|
||||
public BinaryStateSaver(string path, bool notamovie) // notamovie is hack, really should have separate something
|
||||
{
|
||||
_zip = new FrameworkZipWriter(path, notamovie ? Global.Config.SaveStateCompressionLevelNormal : Global.Config.MovieCompressionLevel);
|
||||
}
|
||||
|
||||
if (notamovie)
|
||||
{
|
||||
PutLump(BinaryStateLump.Versiontag, WriteVersion);
|
||||
PutLump(BinaryStateLump.BizVersion, WriteEmuVersion);
|
||||
}
|
||||
public void PutVersionLumps()
|
||||
{
|
||||
PutLump(BinaryStateLump.Versiontag, WriteVersion);
|
||||
PutLump(BinaryStateLump.BizVersion, WriteEmuVersion);
|
||||
}
|
||||
|
||||
public void PutLump(BinaryStateLump lump, Action<Stream> callback)
|
||||
|
|
|
@ -15,7 +15,8 @@ namespace BizHawk.Client.Common
|
|||
|
||||
// the old method of text savestate save is now gone.
|
||||
// a text savestate is just like a binary savestate, but with a different core lump
|
||||
using var bs = new BinaryStateSaver(filename);
|
||||
using var bs = new BinaryStateSaver(filename, true);
|
||||
bs.PutVersionLumps();
|
||||
if (Global.Config.SaveStateType == SaveStateTypeE.Text)
|
||||
{
|
||||
// text savestate format
|
||||
|
|
Loading…
Reference in New Issue