If prompting for a recent rom error, stop sound

This commit is contained in:
andres.delikat 2011-01-21 20:38:37 +00:00
parent 3dd5fdb64f
commit f87090283a
2 changed files with 5 additions and 4 deletions

View File

@ -91,9 +91,11 @@ namespace BizHawk.MultiClient
bool r = LoadRom(rom);
if (!r)
{
Global.Sound.StopSound();
DialogResult result = MessageBox.Show("Could not open " + rom + "\nRemove from list?", "File not found", MessageBoxButtons.YesNo, MessageBoxIcon.Error);
if (result == DialogResult.Yes)
Global.Config.RecentRoms.Remove(rom);
Global.Sound.StartSound();
}
}
@ -615,7 +617,7 @@ namespace BizHawk.MultiClient
private void previousSlotToolStripMenuItem_Click(object sender, EventArgs e)
{
if (SaveSlot == 0) SaveSlot = 9; //Wrap to end of slot list
else if (SaveSlot > 9) SaveSlot = 9; //Meh, just in case
else if (SaveSlot > 9) SaveSlot = 9; //Meh, just in case
else SaveSlot--;
SaveSlotSelectedMessage();
}
@ -771,7 +773,7 @@ namespace BizHawk.MultiClient
var item = new ToolStripMenuItem();
item.Text = path;
item.Click += (o, ev) => LoadRomFromRecent(path);
recentROMToolStripMenuItem.DropDownItems.Add(item); //TODO: truncate this to a nice size
recentROMToolStripMenuItem.DropDownItems.Add(item);
}
}
@ -792,7 +794,7 @@ namespace BizHawk.MultiClient
recentROMToolStripMenuItem.DropDownItems.Add(auto);
}
private void LoadRamWatch() //TODO: accept a filename parameter and feed it to ram watch for loading
private void LoadRamWatch()
{
RamWatch1 = new RamWatch();
if (Global.Config.AutoLoadRamWatch)

View File

@ -116,7 +116,6 @@ namespace BizHawk.MultiClient
private bool SaveWatchFile(string path)
{
var file = new FileInfo(path);
//if (file.Exists == true) //TODO: prompt to overwrite
using (StreamWriter sw = new StreamWriter(path))
{