FFmpegWriterForm: save config
This commit is contained in:
parent
714c090e86
commit
766737ca63
|
@ -290,6 +290,8 @@ namespace BizHawk.MultiClient
|
|||
// Video dumping settings
|
||||
public int JMDCompression = 3;
|
||||
public int JMDThreads = 3;
|
||||
public string FFmpegFormat = "";
|
||||
public string FFmpegCustomCommand = "-c:a foo -c:v bar -f baz";
|
||||
|
||||
// NESPPU Settings
|
||||
public bool AutoLoadNESPPU = false;
|
||||
|
|
|
@ -49,8 +49,11 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
this.name = name;
|
||||
this.desc = desc;
|
||||
this.commandline = commandline;
|
||||
this.custom = custom;
|
||||
if (custom)
|
||||
this.commandline = Global.Config.FFmpegCustomCommand;
|
||||
else
|
||||
this.commandline = commandline;
|
||||
this.defaultext = defaultext;
|
||||
}
|
||||
|
||||
|
@ -109,6 +112,11 @@ namespace BizHawk.MultiClient
|
|||
FFmpegWriterForm dlg = new FFmpegWriterForm();
|
||||
dlg.listBox1.Items.AddRange(FormatPreset.GetPresets());
|
||||
|
||||
int i = dlg.listBox1.FindStringExact(Global.Config.FFmpegFormat);
|
||||
if (i != ListBox.NoMatches)
|
||||
dlg.listBox1.SelectedIndex = i;
|
||||
|
||||
|
||||
DialogResult result = dlg.ShowDialog(owner);
|
||||
|
||||
FormatPreset ret;
|
||||
|
@ -117,8 +125,12 @@ namespace BizHawk.MultiClient
|
|||
else
|
||||
{
|
||||
ret = (FormatPreset)dlg.listBox1.SelectedItem;
|
||||
Global.Config.FFmpegFormat = ret.ToString();
|
||||
if (ret.custom)
|
||||
{
|
||||
ret.commandline = dlg.textBox1.Text;
|
||||
Global.Config.FFmpegCustomCommand = dlg.textBox1.Text;
|
||||
}
|
||||
}
|
||||
dlg.Dispose();
|
||||
return ret;
|
||||
|
|
Loading…
Reference in New Issue