Fix some missed changes from a cherrypick
This commit is contained in:
parent
711aa196af
commit
e649ec71df
1 changed files with 10 additions and 7 deletions
|
@ -143,10 +143,11 @@ MonoAssembly *GDMonoAssembly::_preload_hook(MonoAssemblyName *aname, char **asse
|
||||||
|
|
||||||
if (has_extension ? name == "mscorlib.dll" : name == "mscorlib") {
|
if (has_extension ? name == "mscorlib.dll" : name == "mscorlib") {
|
||||||
GDMonoAssembly **stored_assembly = GDMono::get_singleton()->get_loaded_assembly(has_extension ? name.get_basename() : name);
|
GDMonoAssembly **stored_assembly = GDMono::get_singleton()->get_loaded_assembly(has_extension ? name.get_basename() : name);
|
||||||
if (stored_assembly) return (*stored_assembly)->get_assembly();
|
if (stored_assembly)
|
||||||
|
return (*stored_assembly)->get_assembly();
|
||||||
|
|
||||||
String path;
|
String path;
|
||||||
MonoAssembly *res = NULL;
|
GDMonoAssembly *res = NULL;
|
||||||
|
|
||||||
for (int i = 0; i < search_dirs.size(); i++) {
|
for (int i = 0; i < search_dirs.size(); i++) {
|
||||||
const String &search_dir = search_dirs[i];
|
const String &search_dir = search_dirs[i];
|
||||||
|
@ -154,19 +155,21 @@ MonoAssembly *GDMonoAssembly::_preload_hook(MonoAssemblyName *aname, char **asse
|
||||||
if (has_extension) {
|
if (has_extension) {
|
||||||
path = search_dir.plus_file(name);
|
path = search_dir.plus_file(name);
|
||||||
if (FileAccess::exists(path)) {
|
if (FileAccess::exists(path)) {
|
||||||
res = _load_assembly_from(name.get_basename(), path);
|
res = _load_assembly_from(name.get_basename(), path, refonly);
|
||||||
|
if (res != NULL)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
path = search_dir.plus_file(name + ".dll");
|
path = search_dir.plus_file(name + ".dll");
|
||||||
if (FileAccess::exists(path)) {
|
if (FileAccess::exists(path)) {
|
||||||
res = _load_assembly_from(name, path);
|
res = _load_assembly_from(name, path, refonly);
|
||||||
|
if (res != NULL)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (res) return res;
|
return res ? res->get_assembly() : NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Reference in a new issue