-Fixed LagLog.Clone (was putting LagLog in the new WasLag)

-Fixed lag log being cleared on re-loading branch
This commit is contained in:
Suuper 2015-07-22 13:17:24 -05:00
parent 50aaa61d2c
commit 635ad9c01d
3 changed files with 3 additions and 9 deletions

View File

@ -170,15 +170,9 @@ namespace BizHawk.Client.Common
{
var log = new TasLagLog();
log.LagLog = LagLog.ToList();
log.WasLag = LagLog.ToList();
log.WasLag = WasLag.ToList();
return log;
}
public void FromLagLog(TasLagLog log)
{
LagLog = log.LagLog;
WasLag = log.WasLag;
}
}
}

View File

@ -464,7 +464,7 @@ namespace BizHawk.Client.Common
StateManager.ClearStateHistory();
StateManager.SetState(branch.Frame, branch.CoreData);
LagLog.Clear();
LagLog.FromLagLog(branch.LagLog);
LagLog = branch.LagLog.Clone();
}
}
}

View File

@ -76,7 +76,7 @@ namespace BizHawk.Client.EmuHawk
private void AddContextMenu_Click(object sender, EventArgs e)
{
// TODO: don't use Global.Emulator
var branch = new TasBranch
TasBranch branch = new TasBranch
{
Frame = Global.Emulator.Frame,
CoreData = (byte[])((Global.Emulator as IStatable).SaveStateBinary().Clone()),