internal infrastructure

This commit is contained in:
goyuken 2014-11-23 22:20:55 +00:00
parent ada9ca6fb9
commit c21b3a8a34
1 changed files with 18 additions and 0 deletions

View File

@ -143,6 +143,24 @@ namespace BizHawk.Emulation.Cores
}
}
/// <summary>
/// find an exact core type. slow lookup.
/// </summary>
/// <param name="type"></param>
/// <returns></returns>
public Core FindByType(Type type)
{
foreach (List<Core> cc in systems.Values)
{
foreach (Core c in cc)
{
if (c.Type == type)
return c;
}
}
throw new InvalidOperationException("No such core!");
}
/// <summary>
/// create a core inventory, collecting all IEmulators from some assembilies
/// </summary>