BinarySavestates - add a HasLump() method, and use it to check for clientsettings in tasproj since it may or may not have it
This commit is contained in:
parent
3be3264d60
commit
5436a7d24e
|
@ -167,6 +167,13 @@ namespace BizHawk.Client.Common
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool HasLump(BinaryStateLump lump)
|
||||||
|
{
|
||||||
|
string name = BinaryStateFileNames.GetReadName(lump);
|
||||||
|
ZipEntry e;
|
||||||
|
return _entriesbyname.TryGetValue(name, out e);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a lump
|
/// Gets a lump
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -183,7 +183,7 @@ namespace BizHawk.Client.Common
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (GetClientSettingsOnLoad != null)
|
if (GetClientSettingsOnLoad != null && bl.HasLump(BinaryStateLump.ClientSettings))
|
||||||
{
|
{
|
||||||
string clientSettings = string.Empty;
|
string clientSettings = string.Empty;
|
||||||
bl.GetLump(BinaryStateLump.ClientSettings, true, delegate(TextReader tr)
|
bl.GetLump(BinaryStateLump.ClientSettings, true, delegate(TextReader tr)
|
||||||
|
|
Loading…
Reference in New Issue