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:
parent
0b51a88a7d
commit
14008fbcb0
|
@ -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
|
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)
|
if (path == null)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
@ -320,9 +322,17 @@ namespace BizHawk.Client.Common
|
||||||
rom.GameInfo.System = Global.Config.PreferredPlatformsForExtensions[rom.Extension.ToLower()];
|
rom.GameInfo.System = Global.Config.PreferredPlatformsForExtensions[rom.Extension.ToLower()];
|
||||||
}
|
}
|
||||||
else if (ChoosePlatform != null)
|
else if (ChoosePlatform != null)
|
||||||
|
{
|
||||||
|
var result = ChoosePlatform(rom);
|
||||||
|
if (!string.IsNullOrEmpty(result))
|
||||||
{
|
{
|
||||||
rom.GameInfo.System = ChoosePlatform(rom);
|
rom.GameInfo.System = ChoosePlatform(rom);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cancel = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
game = rom.GameInfo;
|
game = rom.GameInfo;
|
||||||
|
@ -433,8 +443,11 @@ namespace BizHawk.Client.Common
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nextEmulator == null)
|
if (nextEmulator == null)
|
||||||
|
{
|
||||||
|
if (!cancel)
|
||||||
{
|
{
|
||||||
DoLoadErrorCallback("No core could load the rom.", null);
|
DoLoadErrorCallback("No core could load the rom.", null);
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue