ToolManager - lock down UpdateBefore/After, calling code should always only use UpdateToolsBefore/After since it properly deals with lua. This fixes inconsistent behavior in MovieZone and tastudio branch loading

This commit is contained in:
adelikat 2020-04-06 17:46:59 -05:00
parent a47f89582b
commit df538c2833
3 changed files with 8 additions and 8 deletions

View File

@ -183,8 +183,8 @@ namespace BizHawk.Client.EmuHawk
_tools.TAStudio.GoToFrame(Start);
}
_tools.UpdateBefore();
_tools.UpdateAfter();
_tools.UpdateToolsBefore();
_tools.UpdateToolsAfter();
}
else if (_tools.IsLoaded<TAStudio>())
{

View File

@ -1087,8 +1087,8 @@ namespace BizHawk.Client.EmuHawk
}
_hackyDontUpdate = true;
Tools.UpdateBefore();
Tools.UpdateAfter();
Tools.UpdateToolsBefore();
Tools.UpdateToolsAfter();
_hackyDontUpdate = false;
}
@ -1105,8 +1105,8 @@ namespace BizHawk.Client.EmuHawk
private void UpdateOtherTools() // a hack probably, surely there is a better way to do this
{
_hackyDontUpdate = true;
Tools.UpdateBefore();
Tools.UpdateAfter();
Tools.UpdateToolsBefore();
Tools.UpdateToolsAfter();
_hackyDontUpdate = false;
}

View File

@ -457,7 +457,7 @@ namespace BizHawk.Client.EmuHawk
.Where(t => !t.IsInterface)
.Where(IsAvailable);
public void UpdateBefore()
private void UpdateBefore()
{
var beforeList = _tools.Where(t => t.UpdateBefore);
foreach (var tool in beforeList)
@ -478,7 +478,7 @@ namespace BizHawk.Client.EmuHawk
}
}
public void UpdateAfter()
private void UpdateAfter()
{
var afterList = _tools.Where(t => !t.UpdateBefore);
foreach (var tool in afterList)