fix some bugs in ffmpeg handling which seemed to be depending on an older version of ffmpeg; and clarify some rom loading error handling, especially in PCE-CD

This commit is contained in:
zeromus 2014-05-08 03:18:00 +00:00
parent 0dcdb7711b
commit a72c5891e2
4 changed files with 16 additions and 9 deletions

View File

@ -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;
}

View File

@ -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)

View File

@ -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"])

View File

@ -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;