From cc8a94fa5de5c68f05a8123dd87af3c05cda12b3 Mon Sep 17 00:00:00 2001 From: Anairkoen Schno Date: Tue, 19 Feb 2019 19:50:14 -0600 Subject: [PATCH] Removed unneccesary code in Injector --- IPA.Injector/Injector.cs | 31 +------------------------------ 1 file changed, 1 insertion(+), 30 deletions(-) diff --git a/IPA.Injector/Injector.cs b/IPA.Injector/Injector.cs index 9829801c..aac921e5 100644 --- a/IPA.Injector/Injector.cs +++ b/IPA.Injector/Injector.cs @@ -8,7 +8,6 @@ using System; using System.IO; using System.Linq; using System.Reflection; -using System.Runtime.ExceptionServices; using System.Threading.Tasks; using UnityEngine; using static IPA.Logging.Logger; @@ -55,35 +54,7 @@ namespace IPA.Injector loader.Debug("Prepping bootstrapper"); - // The whole mess that follows is an attempt to work around Mono failing to - // call the library load routine for Mono.Cecil when the debugger is attached. - bool runProperly = false; - while (!runProperly) // retry until it finishes, or errors - try // TODO: fix this mess - { // currently it gets stuck in an infinite loop because Mono refuses - // to use Mono.Cecil even if it is loaded when the debugger is attached. - InstallBootstrapPatch(); - runProperly = true; - } - catch (FileNotFoundException e) - { - var asmName = e.FileName; - - AssemblyName name; - try - { // try to parse as an AssemblyName, if it isn't, rethrow the outer exception - name = new AssemblyName(asmName); - } - catch (Exception) - { - ExceptionDispatchInfo.Capture(e).Throw(); - throw; - } - - // name is failed lookup, try to manually load it - LibLoader.AssemblyLibLoader(null, - new ResolveEventArgs(name.FullName, Assembly.GetExecutingAssembly())); - } + InstallBootstrapPatch(); Updates.InstallPendingUpdates();