Remove unnecessary duplicated actions in TAStudio

this should not change any behavior.
This commit is contained in:
Morilli 2024-07-06 17:39:52 +02:00
parent d161215754
commit 4c39a81228
2 changed files with 6 additions and 10 deletions

View File

@ -94,7 +94,7 @@ namespace BizHawk.Client.EmuHawk
public override void Restart()
{
if (!IsHandleCreated || IsDisposed)
if (!IsActive)
{
return;
}
@ -106,18 +106,15 @@ namespace BizHawk.Client.EmuHawk
if (CurrentTasMovie != null)
{
if (Game.Hash != CurrentTasMovie.Hash || CurrentTasMovie.Filename != Settings.RecentTas.MostRecent)
TastudioStopMovie();
// try to load the most recent movie if it matches the currently loaded movie
if (Game.Hash == CurrentTasMovie.Hash && CurrentTasMovie.Filename == Settings.RecentTas.MostRecent)
{
TastudioStopMovie();
TasView.AllColumns.Clear();
StartNewTasMovie();
SetUpColumns();
TasView.Refresh();
LoadMostRecentOrStartNew();
}
else
{
TastudioStopMovie();
LoadMostRecentOrStartNew();
StartNewTasMovie();
}
}
}

View File

@ -680,7 +680,6 @@ namespace BizHawk.Client.EmuHawk
if (!movieLoadSucceeded)
{
TasView.AllColumns.Clear();
StartNewTasMovie();
_engaged = true;
}