diff --git a/BizHawk.Client.Common/RomLoader.cs b/BizHawk.Client.Common/RomLoader.cs index d57728bf83..8bbfd4b996 100644 --- a/BizHawk.Client.Common/RomLoader.cs +++ b/BizHawk.Client.Common/RomLoader.cs @@ -423,13 +423,16 @@ namespace BizHawk.Client.Common if (nextEmulator == null) { - ThrowLoadError("No core could load the rom.", "NULL"); + ThrowLoadError("No core could load the rom.", null); return false; } } catch (Exception ex) { - ThrowLoadError("Exception during loadgame:\n\n" + ex, "NULL"); + string system = null; + if (game != null) + system = game.System; + ThrowLoadError("A core accepted the rom, but throw an exception while loading it:\n\n" + ex, system); return false; } diff --git a/BizHawk.Client.EmuHawk/MainForm.cs b/BizHawk.Client.EmuHawk/MainForm.cs index 0b91db9f9c..5cf37693f0 100644 --- a/BizHawk.Client.EmuHawk/MainForm.cs +++ b/BizHawk.Client.EmuHawk/MainForm.cs @@ -2911,7 +2911,11 @@ namespace BizHawk.Client.EmuHawk private void ShowLoadError(object sender, RomLoader.RomErrorArgs e) { - MessageBox.Show(this, e.Message, e.AttemptedCoreLoad + " load warning", MessageBoxButtons.OK, MessageBoxIcon.Warning); + string title = "load error"; + if (e.AttemptedCoreLoad != null) + title = e.AttemptedCoreLoad + " load error"; + + MessageBox.Show(this, e.Message, title, MessageBoxButtons.OK, MessageBoxIcon.Error); } private void NotifyCoreComm(string message) diff --git a/BizHawk.Emulation.Cores/Consoles/PC Engine/PCEngine.cs b/BizHawk.Emulation.Cores/Consoles/PC Engine/PCEngine.cs index 0854c7ffa4..591004c52f 100644 --- a/BizHawk.Emulation.Cores/Consoles/PC Engine/PCEngine.cs +++ b/BizHawk.Emulation.Cores/Consoles/PC Engine/PCEngine.cs @@ -102,19 +102,18 @@ namespace BizHawk.Emulation.Cores.PCEngine CoreComm.ShowMessage( "The PCE-CD System Card you have selected is known to be a bad dump. This may cause problems playing PCE-CD games.\n\n" + "It is recommended that you find a good dump of the system card. Sorry to be the bearer of bad news!"); - throw new Exception(); } else if (biosInfo.NotInDatabase) { CoreComm.ShowMessage( "The PCE-CD System Card you have selected is not recognized in our database. That might mean it's a bad dump, or isn't the correct rom."); - throw new Exception(); } else if (biosInfo["BIOS"] == false) { + //zeromus says: someone please write a note about how this could possibly happen. + //it seems like this is a relic of using gameDB for storing whether something is a bios? firmwareDB should be handling it now. CoreComm.ShowMessage( - "The PCE-CD System Card you have selected is not a BIOS image. You may have selected the wrong rom."); - throw new Exception(); + "The PCE-CD System Card you have selected is not a BIOS image. You may have selected the wrong rom. FYI-Please report this to developers, I don't think this error message should happen."); } if (biosInfo["SuperSysCard"]) diff --git a/BizHawk.Emulation.DiscSystem/Decoding.cs b/BizHawk.Emulation.DiscSystem/Decoding.cs index b46d362de2..a6803335f4 100644 --- a/BizHawk.Emulation.DiscSystem/Decoding.cs +++ b/BizHawk.Emulation.DiscSystem/Decoding.cs @@ -22,7 +22,7 @@ namespace BizHawk.Emulation.DiscSystem return args.Select(s => s.Contains(" ") ? string.Format("\"{0}\"", s) : s).ToArray(); } - static readonly Regex rxHasAudio = new Regex(@"Stream \#(\d*\.\d*)\: Audio", RegexOptions.Compiled); + static readonly Regex rxHasAudio = new Regex(@"Stream \#(\d*\:\d*)\: Audio", RegexOptions.Compiled); public AudioQueryResult QueryAudio(string path) { var ret = new AudioQueryResult(); @@ -66,7 +66,8 @@ namespace BizHawk.Emulation.DiscSystem }; Process proc = Process.Start(oInfo); - string result = proc.StandardError.ReadToEnd(); + string result = proc.StandardOutput.ReadToEnd(); + result += proc.StandardError.ReadToEnd(); proc.WaitForExit(); return result;