ExternalTool bug fix: wasn't able tool load serveral dll
This commit is contained in:
parent
35066b69ef
commit
12388cbe3d
|
@ -1267,7 +1267,8 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
try
|
||||
{
|
||||
externalToolFile = Assembly.ReflectionOnlyLoadFrom(fi.FullName);
|
||||
//externalToolFile = Assembly.ReflectionOnlyLoadFrom(fi.FullName);
|
||||
externalToolFile = Assembly.LoadFrom(fi.FullName);
|
||||
}
|
||||
catch (BadImageFormatException)
|
||||
{
|
||||
|
@ -1286,10 +1287,12 @@ namespace BizHawk.Client.EmuHawk
|
|||
existing in another assembly, it raises the exception.
|
||||
|
||||
But the advantage of this is that memory footprint is reduced
|
||||
|
||||
EDIT: In fact, I have some trouble when loading Reflection only... moved to regular load
|
||||
*/
|
||||
try
|
||||
{
|
||||
assemblyTypes = externalToolFile.GetTypes();
|
||||
assemblyTypes = externalToolFile.GetTypes().Where<Type>(t => t != null && t.FullName == "BizHawk.Client.EmuHawk.CustomMainForm").ToArray<Type>();
|
||||
}
|
||||
catch (ReflectionTypeLoadException ex)
|
||||
{
|
||||
|
|
|
@ -91,7 +91,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
T existingTool = (T)_tools.FirstOrDefault(x => x is T);
|
||||
|
||||
if (existingTool != null)
|
||||
if (existingTool != null && typeof(T) != typeof(IExternalToolForm))
|
||||
{
|
||||
if (existingTool.IsDisposed)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue