UI: Video Recorder - Auto-fill destination path when opening form

This commit is contained in:
Sour 2020-02-07 19:09:02 -05:00
parent 5ba28f0aaf
commit d15308e575

View file

@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@ -36,6 +37,15 @@ namespace Mesen.GUI.Forms
this.Filename = txtFilename.Text;
}
protected override void OnShown(EventArgs e)
{
base.OnShown(e);
VideoCodec codec = cboVideoCodec.GetEnumValue<VideoCodec>();
string defaultFile = Path.Combine(ConfigManager.AviFolder, InteropEmu.GetRomInfo().GetRomName() + (codec == VideoCodec.GIF ? ".gif" : ".avi"));
txtFilename.Text = defaultFile;
}
private void btnBrowse_Click(object sender, EventArgs e)
{
SaveFileDialog sfd = new SaveFileDialog();