make the rom open filter remember its last option used in this bizhawk session, like how most other programs work.

This commit is contained in:
zeromus 2012-10-20 22:58:01 +00:00
parent ab46a076f2
commit 83a06c4f63
1 changed files with 5 additions and 1 deletions

View File

@ -2902,6 +2902,7 @@ namespace BizHawk.MultiClient
return str;
}
int LastOpenRomFilter = 0;
private void OpenROM()
{
var ofd = new OpenFileDialog();
@ -2946,8 +2947,10 @@ namespace BizHawk.MultiClient
"Genesis (experimental)", "*.gen;*.md;*.smd;*.bin;*.cue;%ARCH%",
"All Files", "*.*");
}
ofd.RestoreDirectory = false;
ofd.FilterIndex = LastOpenRomFilter;
Global.Sound.StopSound();
var result = ofd.ShowDialog();
Global.Sound.StartSound();
@ -2955,6 +2958,7 @@ namespace BizHawk.MultiClient
return;
var file = new FileInfo(ofd.FileName);
Global.Config.LastRomPath = file.DirectoryName;
LastOpenRomFilter = ofd.FilterIndex;
LoadRom(file.FullName);
}