when attempting to load SGB, unset SGB config mode if we fail to load the bios file. this avoids a catch-22 where you can't load an SGB because you don't have a rom, and you can't reset to GB mode because you can't get the menu item.
This commit is contained in:
parent
ff117d2c49
commit
ddf99f789c
|
@ -1469,7 +1469,17 @@ namespace BizHawk.MultiClient
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// todo: get these bioses into a gamedb??
|
// todo: get these bioses into a gamedb??
|
||||||
byte[] sgbrom = File.ReadAllBytes(PathManager.MakeAbsolutePath(Global.Config.PathSGBRom, "SGB"));
|
byte[] sgbrom;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
sgbrom = File.ReadAllBytes(PathManager.MakeAbsolutePath(Global.Config.PathSGBRom, "SGB"));
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
// failed to load SGB bios. to avoid catch-22, disable SGB mode
|
||||||
|
Global.Config.GB_AsSGB = false;
|
||||||
|
throw;
|
||||||
|
}
|
||||||
game.AddOption("SGB");
|
game.AddOption("SGB");
|
||||||
game.System = "SGB";
|
game.System = "SGB";
|
||||||
var snes = new LibsnesCore();
|
var snes = new LibsnesCore();
|
||||||
|
|
Loading…
Reference in New Issue