TraceLogger - Turn off core tracing when closing, TooManager - check for disposed tools before running NewUpdate(), fixes #911

This commit is contained in:
adelikat 2017-07-09 13:18:59 -05:00
parent a9ba725cb3
commit af3ab7c208
2 changed files with 14 additions and 3 deletions

View File

@ -427,7 +427,10 @@ namespace BizHawk.Client.EmuHawk
foreach (var tool in _tools)
{
tool.NewUpdate(ToolFormUpdateType.PreFrame);
if (!tool.IsDisposed)
{
tool.NewUpdate(ToolFormUpdateType.PreFrame);
}
}
}
@ -445,7 +448,10 @@ namespace BizHawk.Client.EmuHawk
foreach (var tool in _tools)
{
tool.NewUpdate(ToolFormUpdateType.PostFrame);
if (!tool.IsDisposed)
{
tool.NewUpdate(ToolFormUpdateType.PostFrame);
}
}
}

View File

@ -62,7 +62,12 @@ namespace BizHawk.Client.EmuHawk
TraceView.QueryItemText += TraceView_QueryItemText;
TraceView.VirtualMode = true;
Closing += (o, e) => SaveConfigSettings();
Closing += (o, e) =>
{
SaveConfigSettings();
Tracer.Sink = null;
CloseFile();
};
MaxLines = 10000;
FileSizeCap = 150; // make 1 frame of tracelog for n64/psx fit in