parent
32d2f23117
commit
eee8a7e0cc
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue