Rewind Config dialog is no Chuck Norris, so don't attempt to divide by zero

This commit is contained in:
adelikat 2013-08-08 12:49:02 +00:00
parent 5030f6e328
commit 6472d48c1b
1 changed files with 9 additions and 2 deletions

View File

@ -245,10 +245,17 @@ namespace BizHawk.MultiClient
{
long avg_state_size = 0;
if (UseDeltaCompression.Checked)
if (UseDeltaCompression.Checked || StateSize == 0)
{
avg_state_size = (long)(Global.MainForm.Rewind_Size / Global.MainForm.Rewind_Count);
if (Global.MainForm.Rewind_Count > 0)
{
avg_state_size = (long)(Global.MainForm.Rewind_Size / Global.MainForm.Rewind_Count);
}
else
{
avg_state_size = Global.Emulator.SaveStateBinary().Length;
}
}
else
{