remove GlobalWin usage in RecordMovie.cs

This commit is contained in:
adelikat 2020-06-12 11:48:51 -05:00
parent 13b6b09771
commit 066e282b39
2 changed files with 7 additions and 4 deletions

View File

@ -496,7 +496,7 @@ namespace BizHawk.Client.EmuHawk
// Inaccurate core but allow the user to continue anyway
}
using var form = new RecordMovie(this, Config, Game, Emulator, MovieSession);
using var form = new RecordMovie(this, Config, Game, Emulator, MovieSession, FirmwareManager);
form.ShowDialog();
}

View File

@ -16,19 +16,22 @@ namespace BizHawk.Client.EmuHawk
private readonly GameInfo _game;
private readonly IEmulator _emulator;
private readonly IMovieSession _movieSession;
private readonly FirmwareManager _firmwareManager;
public RecordMovie(
MainForm mainForm,
Config config,
GameInfo game,
IEmulator core,
IMovieSession movieSession)
IMovieSession movieSession,
FirmwareManager firmwareManager)
{
_mainForm = mainForm;
_config = config;
_game = game;
_emulator = core;
_movieSession = movieSession;
_firmwareManager = firmwareManager;
InitializeComponent();
if (!_emulator.HasSavestates())
@ -132,8 +135,8 @@ namespace BizHawk.Client.EmuHawk
movieToRecord.PopulateWithDefaultHeaderValues(
_emulator,
GlobalWin.Game,
GlobalWin.FirmwareManager,
_game,
_firmwareManager,
AuthorBox.Text ?? _config.DefaultAuthor);
movieToRecord.Save();
_mainForm.StartNewMovie(movieToRecord, true);