TAStudio: Update self after loading a state. There doesn't seem to be any reason to not update TAStudio, and doing so fixes two bugs that were most evident when loading the state for frame 0:

-The UI was not updated.
-TasSession.UpdateValues was not called.  So saving the movie and then re-loading it would result in the previous frame being loaded/seeked to.
This commit is contained in:
SuuperW 2022-01-19 16:03:30 -06:00
parent 822cc53252
commit bb226f694a
2 changed files with 2 additions and 10 deletions

View File

@ -19,7 +19,6 @@ namespace BizHawk.Client.EmuHawk
[OptionalService]
public ISaveRam SaveRamEmulator { get; private set; }
private bool _hackyDontUpdate;
private bool _initializing; // If true, will bypass restart logic, this is necessary since loading projects causes a movie to load which causes a rom to reload causing dialogs to restart
private int _lastRefresh;
@ -67,11 +66,6 @@ namespace BizHawk.Client.EmuHawk
return;
}
if (_hackyDontUpdate)
{
return;
}
if (_exiting)
{
return;

View File

@ -961,18 +961,16 @@ namespace BizHawk.Client.EmuHawk
Emulator.ResetCounters();
}
UpdateOtherTools();
UpdateTools();
}
public void AddBranchExternal() => BookMarkControl.AddBranchExternal();
public void RemoveBranchExternal() => BookMarkControl.RemoveBranchExternal();
private void UpdateOtherTools() // a hack probably, surely there is a better way to do this
private void UpdateTools()
{
_hackyDontUpdate = true;
Tools.UpdateToolsBefore();
Tools.UpdateToolsAfter();
_hackyDontUpdate = false;
}
public void TogglePause()