Simplify Movie extensions ToBk2()
This commit is contained in:
parent
42356dd32b
commit
3e354ed230
|
@ -77,7 +77,7 @@ namespace BizHawk.Client.Common.MovieConversionExtensions
|
|||
return tas;
|
||||
}
|
||||
|
||||
public static IMovie ToBk2(this IMovie old, bool copy = false, bool backup = false)
|
||||
public static IMovie ToBk2(this IMovie old)
|
||||
{
|
||||
var bk2 = new Bk2Movie(old.Filename.Replace(old.PreferredExtension, Bk2Movie.Extension));
|
||||
|
||||
|
@ -87,11 +87,6 @@ namespace BizHawk.Client.Common.MovieConversionExtensions
|
|||
bk2.AppendFrame(input);
|
||||
}
|
||||
|
||||
if (!copy)
|
||||
{
|
||||
old.Truncate(0); // Trying to minimize ram usage
|
||||
}
|
||||
|
||||
bk2.HeaderEntries.Clear();
|
||||
foreach (var kvp in old.HeaderEntries)
|
||||
{
|
||||
|
@ -116,11 +111,6 @@ namespace BizHawk.Client.Common.MovieConversionExtensions
|
|||
bk2.BinarySavestate = old.BinarySavestate;
|
||||
bk2.SaveRam = old.SaveRam;
|
||||
|
||||
if (!backup)
|
||||
{
|
||||
bk2.Save();
|
||||
}
|
||||
|
||||
return bk2;
|
||||
}
|
||||
|
||||
|
|
|
@ -185,7 +185,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
private void SaveBk2BackupMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
_autosaveTimer.Stop();
|
||||
var bk2 = CurrentTasMovie.ToBk2(copy: true, backup: true);
|
||||
var bk2 = CurrentTasMovie.ToBk2();
|
||||
MessageStatusLabel.Text = "Exporting to .bk2...";
|
||||
Cursor = Cursors.WaitCursor;
|
||||
Update();
|
||||
|
@ -258,7 +258,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
MessageBox.Show("This core requires emulation to be on the last frame when writing the movie, otherwise movie length will appear incorrect.\nTAStudio can't handle this, so Export BK2, play it to the end, and then Save Movie.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
}
|
||||
|
||||
var bk2 = CurrentTasMovie.ToBk2(true, true);
|
||||
var bk2 = CurrentTasMovie.ToBk2();
|
||||
MessageStatusLabel.Text = "Exporting to .bk2...";
|
||||
Cursor = Cursors.WaitCursor;
|
||||
Update();
|
||||
|
|
Loading…
Reference in New Issue