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:
parent
822cc53252
commit
bb226f694a
|
@ -19,7 +19,6 @@ namespace BizHawk.Client.EmuHawk
|
||||||
[OptionalService]
|
[OptionalService]
|
||||||
public ISaveRam SaveRamEmulator { get; private set; }
|
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 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;
|
private int _lastRefresh;
|
||||||
|
@ -67,11 +66,6 @@ namespace BizHawk.Client.EmuHawk
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_hackyDontUpdate)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_exiting)
|
if (_exiting)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -961,18 +961,16 @@ namespace BizHawk.Client.EmuHawk
|
||||||
Emulator.ResetCounters();
|
Emulator.ResetCounters();
|
||||||
}
|
}
|
||||||
|
|
||||||
UpdateOtherTools();
|
UpdateTools();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AddBranchExternal() => BookMarkControl.AddBranchExternal();
|
public void AddBranchExternal() => BookMarkControl.AddBranchExternal();
|
||||||
public void RemoveBranchExternal() => BookMarkControl.RemoveBranchExternal();
|
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.UpdateToolsBefore();
|
||||||
Tools.UpdateToolsAfter();
|
Tools.UpdateToolsAfter();
|
||||||
_hackyDontUpdate = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void TogglePause()
|
public void TogglePause()
|
||||||
|
|
Loading…
Reference in New Issue