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
|
try
|
||||||
{
|
{
|
||||||
externalToolFile = Assembly.ReflectionOnlyLoadFrom(fi.FullName);
|
//externalToolFile = Assembly.ReflectionOnlyLoadFrom(fi.FullName);
|
||||||
|
externalToolFile = Assembly.LoadFrom(fi.FullName);
|
||||||
}
|
}
|
||||||
catch (BadImageFormatException)
|
catch (BadImageFormatException)
|
||||||
{
|
{
|
||||||
|
@ -1286,10 +1287,12 @@ namespace BizHawk.Client.EmuHawk
|
||||||
existing in another assembly, it raises the exception.
|
existing in another assembly, it raises the exception.
|
||||||
|
|
||||||
But the advantage of this is that memory footprint is reduced
|
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
|
try
|
||||||
{
|
{
|
||||||
assemblyTypes = externalToolFile.GetTypes();
|
assemblyTypes = externalToolFile.GetTypes().Where<Type>(t => t != null && t.FullName == "BizHawk.Client.EmuHawk.CustomMainForm").ToArray<Type>();
|
||||||
}
|
}
|
||||||
catch (ReflectionTypeLoadException ex)
|
catch (ReflectionTypeLoadException ex)
|
||||||
{
|
{
|
||||||
|
|
|
@ -91,7 +91,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
T existingTool = (T)_tools.FirstOrDefault(x => x is T);
|
T existingTool = (T)_tools.FirstOrDefault(x => x is T);
|
||||||
|
|
||||||
if (existingTool != null)
|
if (existingTool != null && typeof(T) != typeof(IExternalToolForm))
|
||||||
{
|
{
|
||||||
if (existingTool.IsDisposed)
|
if (existingTool.IsDisposed)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue