TAstudio - no stack overflow in some (or all) situations related to closing

This commit is contained in:
adelikat 2014-08-19 23:56:33 +00:00
parent 321c8c64bf
commit a6c87a7262
2 changed files with 7 additions and 1 deletions

View File

@ -8,7 +8,8 @@
GlobalWin.OSD.AddMessage("TAStudio does not allow manual readonly toggle");
}
public bool WantsToControlStopMovie { get { return true; } }
public bool WantsToControlStopMovie { get; private set; }
public void StopMovie()
{
this.Focus();

View File

@ -72,6 +72,7 @@ namespace BizHawk.Client.EmuHawk
public TAStudio()
{
InitializeComponent();
WantsToControlStopMovie = true;
TasPlaybackBox.Tastudio = this;
MarkerControl.Tastudio = this;
TasView.QueryItemText += TasView_QueryItemText;
@ -137,7 +138,9 @@ namespace BizHawk.Client.EmuHawk
if (AskSaveChanges())
{
NewTasMovie();
WantsToControlStopMovie = false;
GlobalWin.MainForm.StartNewMovie(_currentTasMovie, record: true);
WantsToControlStopMovie = true;
RefreshDialog();
}
}
@ -157,7 +160,9 @@ namespace BizHawk.Client.EmuHawk
Global.Config.RecentTas.HandleLoadError(path);
}
WantsToControlStopMovie = false;
GlobalWin.MainForm.StartNewMovie(movie, record: false);
WantsToControlStopMovie = true;
_currentTasMovie = Global.MovieSession.Movie as TasMovie;
Global.Config.RecentTas.Add(path);
RefreshDialog();