From 83a06c4f630f6099e3ec54da8084f44e2cc71fa5 Mon Sep 17 00:00:00 2001 From: zeromus Date: Sat, 20 Oct 2012 22:58:01 +0000 Subject: [PATCH] make the rom open filter remember its last option used in this bizhawk session, like how most other programs work. --- BizHawk.MultiClient/MainForm.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/BizHawk.MultiClient/MainForm.cs b/BizHawk.MultiClient/MainForm.cs index bf61ac00d5..ad657d5ef2 100644 --- a/BizHawk.MultiClient/MainForm.cs +++ b/BizHawk.MultiClient/MainForm.cs @@ -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); }