don't show a "No core could load a rom" nag if the user cancels out of the platform chooser

This commit is contained in:
adelikat 2014-12-14 02:13:06 +00:00
parent 0b51a88a7d
commit 14008fbcb0
1 changed files with 15 additions and 2 deletions

View File

@ -154,6 +154,8 @@ namespace BizHawk.Client.Common
public bool LoadRom(string path, CoreComm nextComm, bool forceAccurateCore = false) // forceAccurateCore is currently just for Quicknes vs Neshawk but could be used for other situations
{
bool cancel = false;
if (path == null)
{
return false;
@ -321,7 +323,15 @@ namespace BizHawk.Client.Common
}
else if (ChoosePlatform != null)
{
rom.GameInfo.System = ChoosePlatform(rom);
var result = ChoosePlatform(rom);
if (!string.IsNullOrEmpty(result))
{
rom.GameInfo.System = ChoosePlatform(rom);
}
else
{
cancel = true;
}
}
}
@ -434,7 +444,10 @@ namespace BizHawk.Client.Common
if (nextEmulator == null)
{
DoLoadErrorCallback("No core could load the rom.", null);
if (!cancel)
{
DoLoadErrorCallback("No core could load the rom.", null);
}
return false;
}
}