Multihawk - pass the Emulator instance into the RecordMovie dialog instead of using Global.Emulator

This commit is contained in:
adelikat 2016-12-06 10:49:55 -06:00
parent ad41019a29
commit 2fbcaba8f4
2 changed files with 10 additions and 6 deletions

View File

@ -1121,7 +1121,7 @@ namespace BizHawk.Client.MultiHawk
private void RecordMovieMenuItem_Click(object sender, EventArgs e)
{
new RecordMovie().ShowDialog();
new RecordMovie(Emulator).ShowDialog();
UpdateMainText();
UpdateAfterFrameChanged();
}

View File

@ -13,12 +13,16 @@ namespace BizHawk.Client.MultiHawk
{
public partial class RecordMovie : Form
{
private IEmulator Emulator;
// TODO - Allow relative paths in record textbox
public RecordMovie()
public RecordMovie(IEmulator core)
{
InitializeComponent();
if (!Global.Emulator.HasSavestates())
Emulator = core;
if (!Emulator.HasSavestates())
{
StartFromCombo.Items.Remove(
StartFromCombo.Items
@ -77,9 +81,9 @@ namespace BizHawk.Client.MultiHawk
Directory.CreateDirectory(fileInfo.DirectoryName);
}
//if (StartFromCombo.SelectedItem.ToString() == "Now" && Global.Emulator.HasSavestates())
//if (StartFromCombo.SelectedItem.ToString() == "Now" && Emulator.HasSavestates())
//{
// var core = Global.Emulator.AsStatable();
// var core = Emulator.AsStatable();
// movieToRecord.StartsFromSavestate = true;
@ -103,7 +107,7 @@ namespace BizHawk.Client.MultiHawk
// if (movieToRecord.SavestateFramebuffer != null)
// {
// movieToRecord.SavestateFramebuffer = (int[])Global.Emulator.VideoProvider().GetVideoBuffer().Clone();
// movieToRecord.SavestateFramebuffer = (int[])Emulator.VideoProvider().GetVideoBuffer().Clone();
// }
// }
//}