diff --git a/src/BizHawk.Client.Common/config/Config.cs b/src/BizHawk.Client.Common/config/Config.cs index 1d27da5572..cec408a7d6 100644 --- a/src/BizHawk.Client.Common/config/Config.cs +++ b/src/BizHawk.Client.Common/config/Config.cs @@ -374,6 +374,8 @@ namespace BizHawk.Client.Common public bool AVWriterPad { get; set; } = false; - public (int Width, int Height) AVWriterResize { get; set; } = (0, 0); + public int AVWriterResizeHeight { get; set; } = 0; + + public int AVWriterResizeWidth { get; set; } = 0; } } diff --git a/src/BizHawk.Client.EmuHawk/AVOut/VideoWriterChooserForm.cs b/src/BizHawk.Client.EmuHawk/AVOut/VideoWriterChooserForm.cs index a1b9aa9192..587d21854f 100644 --- a/src/BizHawk.Client.EmuHawk/AVOut/VideoWriterChooserForm.cs +++ b/src/BizHawk.Client.EmuHawk/AVOut/VideoWriterChooserForm.cs @@ -68,8 +68,8 @@ namespace BizHawk.Client.EmuHawk { checkBoxASync = { Checked = config.VideoWriterAudioSyncEffective }, checkBoxPad = { Checked = config.AVWriterPad }, - numericTextBoxH = { Text = Math.Max(0, config.AVWriterResize.Height).ToString() }, - numericTextBoxW = { Text = Math.Max(0, config.AVWriterResize.Width).ToString() }, + numericTextBoxH = { Text = Math.Max(0, config.AVWriterResizeHeight).ToString() }, + numericTextBoxW = { Text = Math.Max(0, config.AVWriterResizeWidth).ToString() }, labelDescriptionBody = { Text = "" } }; @@ -106,7 +106,7 @@ namespace BizHawk.Client.EmuHawk if (ret is not null) { - config.AVWriterResize = dlg.checkBoxResize.Checked + (config.AVWriterResizeWidth, config.AVWriterResizeHeight) = dlg.checkBoxResize.Checked ? (dlg.numericTextBoxW.IntValue, dlg.numericTextBoxH.IntValue) : (-1, -1); config.AVWriterPad = dlg.checkBoxPad.Checked; diff --git a/src/BizHawk.Client.EmuHawk/MainForm.cs b/src/BizHawk.Client.EmuHawk/MainForm.cs index 099dc7c4fa..b97726f931 100644 --- a/src/BizHawk.Client.EmuHawk/MainForm.cs +++ b/src/BizHawk.Client.EmuHawk/MainForm.cs @@ -3381,9 +3381,9 @@ namespace BizHawk.Client.EmuHawk aw = Config.VideoWriterAudioSyncEffective ? new VideoStretcher(aw) : new AudioStretcher(aw); aw.SetMovieParameters(Emulator.VsyncNumerator(), Emulator.VsyncDenominator()); - if (Config.AVWriterResize.Width > 0 && Config.AVWriterResize.Height > 0) + if (Config.AVWriterResizeWidth > 0 && Config.AVWriterResizeHeight > 0) { - aw.SetVideoParameters(Config.AVWriterResize.Width, Config.AVWriterResize.Height); + aw.SetVideoParameters(Config.AVWriterResizeWidth, Config.AVWriterResizeHeight); } else { @@ -3546,7 +3546,7 @@ namespace BizHawk.Client.EmuHawk { IVideoProvider output; IDisposable disposableOutput = null; - if (Config.AVWriterResize.Width > 0 && Config.AVWriterResize.Height > 0) + if (Config.AVWriterResizeWidth > 0 && Config.AVWriterResizeHeight > 0) { BitmapBuffer bbIn = null; Bitmap bmpIn = null; @@ -3558,7 +3558,7 @@ namespace BizHawk.Client.EmuHawk bbIn.DiscardAlpha(); - Bitmap bmpOut = new(width: Config.AVWriterResize.Width, height: Config.AVWriterResize.Height, PixelFormat.Format32bppArgb); + Bitmap bmpOut = new(width: Config.AVWriterResizeWidth, height: Config.AVWriterResizeHeight, PixelFormat.Format32bppArgb); bmpIn = bbIn.ToSysdrawingBitmap(); using (var g = Graphics.FromImage(bmpOut)) {