Debugger: Lua - Reuse last folder when saving scripts, too

This commit is contained in:
Souryo 2017-10-03 17:17:56 -04:00
parent 63bf64c3b2
commit 213b67064b

View file

@ -255,6 +255,9 @@ namespace Mesen.GUI.Debugger
{
using(SaveFileDialog sfd = new SaveFileDialog()) {
sfd.FileName = newName;
if(ConfigManager.Config.DebugInfo.RecentScripts.Count > 0) {
sfd.InitialDirectory = Path.GetDirectoryName(ConfigManager.Config.DebugInfo.RecentScripts[0]);
}
sfd.SetFilter("Lua scripts (*.lua)|*.lua");
if(sfd.ShowDialog() == DialogResult.OK) {
SetFilePath(sfd.FileName);