tastudio: fix regular movie opening from tastudio

This commit is contained in:
feos 2017-02-04 22:33:19 +03:00
parent 961c5d7a03
commit ae15073180
3 changed files with 27 additions and 31 deletions

View File

@ -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)

View File

@ -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);
}
}
}
}

View File

@ -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();