diff --git a/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.IToolForm.cs b/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.IToolForm.cs index fb4dde2a12..d931c2c6ae 100644 --- a/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.IToolForm.cs +++ b/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.IToolForm.cs @@ -31,14 +31,13 @@ namespace BizHawk.Client.EmuHawk public void UpdateValues() { if (!IsHandleCreated || IsDisposed || CurrentTasMovie == null) - { return; - } if (_hackyDontUpdate) - { return; - } + + if (_exiting) + return; bool refreshNeeded = false; if (AutoadjustInputMenuItem.Checked) diff --git a/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.MenuItems.cs b/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.MenuItems.cs index 473e89ea2a..55ae76f57a 100644 --- a/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.MenuItems.cs +++ b/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.MenuItems.cs @@ -41,11 +41,7 @@ namespace BizHawk.Client.EmuHawk private void NewTasMenuItem_Click(object sender, EventArgs e) { - if (Mainform.GameIsClosing) - { - Close(); - } - else + if (!Mainform.GameIsClosing) { StartNewTasMovie(); } @@ -75,7 +71,26 @@ namespace BizHawk.Client.EmuHawk var result = ofd.ShowHawkDialog(); if (result == DialogResult.OK) { - LoadFile(new FileInfo(ofd.FileName)); + if (ofd.FileName.EndsWith(TasMovie.Extension)) + { + LoadFile(new FileInfo(ofd.FileName)); + } + else if (ofd.FileName.EndsWith(".bkm") || ofd.FileName.EndsWith(".bk2")) // was loaded using "All Files" filter. todo: proper extention iteration + { + Mainform.StartNewMovie(MovieService.Get(ofd.FileName), false); + + var result1 = MessageBox.Show("This is a regular movie, a new project must be created from it, in order to use in TAStudio\nProceed?", "Convert movie", MessageBoxButtons.OKCancel, MessageBoxIcon.Question); + if (result1 == DialogResult.OK) + { + ConvertCurrentMovieToTasproj(); + StartNewMovieWrapper(false); + SetUpColumns(); + } + } + else + { + MessageBox.Show("This is not a BizHawk movie!", "Movie load error", MessageBoxButtons.OK, MessageBoxIcon.Error); + } } } } diff --git a/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs b/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs index 41d885f3b5..bbb0632837 100644 --- a/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs +++ b/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs @@ -623,27 +623,6 @@ namespace BizHawk.Client.EmuHawk } else { - if (movie.Filename.EndsWith(TasMovie.Extension)) - { - - } - else if (movie.Filename.EndsWith(".bkm") || movie.Filename.EndsWith(".bk2")) // was loaded using "All Files" filter. todo: proper extention iteration - { - var result1 = MessageBox.Show("This is a regular movie, a new project must be created from it, in order to use in TAStudio\nProceed?", "Convert movie", MessageBoxButtons.OKCancel, MessageBoxIcon.Question); - if (result1 == DialogResult.OK) - { - ConvertCurrentMovieToTasproj(); - StartNewMovieWrapper(false, movie); - SetUpColumns(); - return true; - } - return false; - } - else - { - MessageBox.Show("This is not a BizHawk movie!", "Movie load error", MessageBoxButtons.OK, MessageBoxIcon.Error); - return false; - } result = StartNewMovieWrapper(false, movie); } @@ -776,6 +755,9 @@ namespace BizHawk.Client.EmuHawk public void RefreshDialog(bool refreshTasView = true) { + if (_exiting) + return; + if (refreshTasView) RefreshTasView();