add provision for saving mismatching state frames in tastudio integrity checker

This commit is contained in:
zeromus 2020-10-03 23:53:46 -04:00
parent 6ee62023a2
commit f561e79489
1 changed files with 11 additions and 1 deletions

View File

@ -786,7 +786,17 @@ namespace BizHawk.Client.EmuHawk
if (!state.SequenceEqual(greenZone))
{
MessageBox.Show($"Bad data between frames {lastState} and {Emulator.Frame}");
if (MessageBox.Show($"Bad data between frames {lastState} and {Emulator.Frame}. Save the relevant state (raw data)?", "Integrity Failed!", MessageBoxButtons.YesNo) == DialogResult.Yes)
{
var sfd = new SaveFileDialog();
sfd.FileName = "integrity.fresh";
if (sfd.ShowDialog() == DialogResult.OK)
{
File.WriteAllBytes(sfd.FileName, state);
var path = Path.ChangeExtension(sfd.FileName, ".greenzoned");
File.WriteAllBytes(path, greenZone);
}
}
return;
}