TAStudio: orderly shutdown if starting TAStudio returned nullEmulator.

This commit is contained in:
alyosha-tas 2019-04-21 08:46:50 -04:00
parent 6f1d61420d
commit 655729f29c
2 changed files with 17 additions and 3 deletions

View File

@ -104,6 +104,11 @@ namespace BizHawk.Client.EmuHawk
GlobalWin.OSD.AddMessage("Warning: Movie hash does not match the ROM");
}
if (Emulator is NullEmulator)
{
return false;
}
return true;
}

View File

@ -416,6 +416,12 @@ namespace BizHawk.Client.EmuHawk
StartNewTasMovie();
}
if (Global.Emulator is NullEmulator)
{
DisengageTastudio();
return false;
}
EngageTastudio();
return true;
}
@ -648,8 +654,11 @@ namespace BizHawk.Client.EmuHawk
CurrentTasMovie.PopulateWithDefaultHeaderValues();
SetTasMovieCallbacks();
CurrentTasMovie.ClearChanges(); // Don't ask to save changes here.
HandleMovieLoadStuff();
CurrentTasMovie.TasStateManager.Capture(); // Capture frame 0 always.
if (HandleMovieLoadStuff())
{
CurrentTasMovie.TasStateManager.Capture(); // Capture frame 0 always.
}
// clear all selections
TasView.DeselectAll();
@ -699,7 +708,7 @@ namespace BizHawk.Client.EmuHawk
{
movie = CurrentTasMovie;
}
SetTasMovieCallbacks(movie as TasMovie);
bool result = Mainform.StartNewMovie(movie, record);