From 9de7ee3336372bb64f0d55e8b6348d02d3d53a18 Mon Sep 17 00:00:00 2001 From: adelikat Date: Sun, 25 Nov 2012 03:47:58 +0000 Subject: [PATCH] GBA - do bio file path, not firmwares folder path --- BizHawk.MultiClient/Config.cs | 2 +- BizHawk.MultiClient/MainForm.cs | 5 +++-- BizHawk.MultiClient/config/PathConfig.cs | 9 ++++++--- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/BizHawk.MultiClient/Config.cs b/BizHawk.MultiClient/Config.cs index 20f8fb5b15..df7b4d0b77 100644 --- a/BizHawk.MultiClient/Config.cs +++ b/BizHawk.MultiClient/Config.cs @@ -108,7 +108,6 @@ namespace BizHawk.MultiClient public string PathGBASaveRAM = Path.Combine(".", "SaveRAM"); public string PathGBAScreenshots = Path.Combine(".", "Screenshots"); public string PathGBACheats = Path.Combine(".", "Cheats"); - public string PathGBAFirmwares = Path.Combine(".", "Firmwares"); public string BaseSMS = Path.Combine(".", "SMS"); public string PathSMSROMs = "."; @@ -196,6 +195,7 @@ namespace BizHawk.MultiClient public string LogPath = "."; //BIOS Paths + public string PathGBABIOS = Path.Combine(".", "gbabios.rom"); public string PathPCEBios = Path.Combine(".", "PCECDBios.pce"); public string PathCOLBios = Path.Combine(".", "ColecoBios.bin"); public string PathINTVGROM = Path.Combine(".", "grom.bin"); diff --git a/BizHawk.MultiClient/MainForm.cs b/BizHawk.MultiClient/MainForm.cs index ddb131e6fc..9b69bcaca3 100644 --- a/BizHawk.MultiClient/MainForm.cs +++ b/BizHawk.MultiClient/MainForm.cs @@ -1831,6 +1831,7 @@ namespace BizHawk.MultiClient if (!colfile.Exists) { MessageBox.Show("Unable to find the required ColecoVision BIOS file - \n" + colbiosPath, "Unable to load BIOS", MessageBoxButtons.OK, MessageBoxIcon.Error); + throw new Exception(); } else { @@ -1870,7 +1871,7 @@ namespace BizHawk.MultiClient nextEmulator = c64; break; case "GBA": - string gbabiospath = Path.Combine(PathManager.MakeAbsolutePath(Global.Config.PathGBAFirmwares, "GBA"), "gbabios.rom"); + string gbabiospath = PathManager.MakeAbsolutePath(Global.Config.PathGBABIOS, "GBA"); byte[] gbabios = null; if (File.Exists(gbabiospath)) @@ -1879,7 +1880,7 @@ namespace BizHawk.MultiClient } else { - MessageBox.Show(string.Format("Couldn't open GBA BIOS: {0}\nCheck your firmware config", gbabiospath)); + MessageBox.Show("Unable to find the required GBA BIOS file - \n" + gbabios, "Unable to load BIOS", MessageBoxButtons.OK, MessageBoxIcon.Error); throw new Exception(); } GBA gba = new GBA(); diff --git a/BizHawk.MultiClient/config/PathConfig.cs b/BizHawk.MultiClient/config/PathConfig.cs index f038321c8c..340ea43396 100644 --- a/BizHawk.MultiClient/config/PathConfig.cs +++ b/BizHawk.MultiClient/config/PathConfig.cs @@ -126,7 +126,7 @@ namespace BizHawk.MultiClient GBASaveRAMBox.Text = Global.Config.PathGBASaveRAM; GBAScreenshotsBox.Text = Global.Config.PathGBAScreenshots; GBACheatsBox.Text = Global.Config.PathGBACheats; - GBAFirmwaresBox.Text = Global.Config.PathGBAFirmwares; + GBAFirmwaresBox.Text = Global.Config.PathGBABIOS; TI83BaseBox.Text = Global.Config.BaseTI83; TI83ROMsBox.Text = Global.Config.PathTI83ROMs; @@ -307,7 +307,7 @@ namespace BizHawk.MultiClient Global.Config.PathGBASaveRAM = GBASaveRAMBox.Text; Global.Config.PathGBAScreenshots = GBAScreenshotsBox.Text; Global.Config.PathGBACheats = GBACheatsBox.Text; - Global.Config.PathGBAFirmwares = GBAFirmwaresBox.Text; + Global.Config.PathGBABIOS = GBAFirmwaresBox.Text; Global.Config.BaseTI83 = TI83BaseBox.Text; Global.Config.PathTI83ROMs = TI83ROMsBox.Text; @@ -1038,7 +1038,10 @@ namespace BizHawk.MultiClient private void GBABrowseFirmwares_Click(object sender, EventArgs e) { - BrowseFolder(GBAFirmwaresBox, GBAFirmwaresDescription.Text); + BrowseForBios( + "GBA BIOS (*.rom)|*.rom|All Files|*.*", + Global.Config.PathGBABIOS, "GBA", + GBAFirmwaresBox); } } }