From 066e282b39a371872baad38375ac7ad00326543e Mon Sep 17 00:00:00 2001 From: adelikat Date: Fri, 12 Jun 2020 11:48:51 -0500 Subject: [PATCH] remove GlobalWin usage in RecordMovie.cs --- src/BizHawk.Client.EmuHawk/MainForm.Events.cs | 2 +- src/BizHawk.Client.EmuHawk/movie/RecordMovie.cs | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/BizHawk.Client.EmuHawk/MainForm.Events.cs b/src/BizHawk.Client.EmuHawk/MainForm.Events.cs index d9d0b540d5..c11df17bb2 100644 --- a/src/BizHawk.Client.EmuHawk/MainForm.Events.cs +++ b/src/BizHawk.Client.EmuHawk/MainForm.Events.cs @@ -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(); } diff --git a/src/BizHawk.Client.EmuHawk/movie/RecordMovie.cs b/src/BizHawk.Client.EmuHawk/movie/RecordMovie.cs index b112988df2..436b480270 100644 --- a/src/BizHawk.Client.EmuHawk/movie/RecordMovie.cs +++ b/src/BizHawk.Client.EmuHawk/movie/RecordMovie.cs @@ -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);