Browse Source

Added safer virtualization and anti-yeet support

pull/46/head
Anairkoen Schno 5 years ago
parent
commit
6aa5fa00c3
1 changed files with 11 additions and 3 deletions
  1. +11
    -3
      IPA.Injector/Injector.cs

+ 11
- 3
IPA.Injector/Injector.cs View File

@ -237,15 +237,23 @@ namespace IPA.Injector
{
var ascPath = Path.Combine(managedPath,
"Assembly-CSharp.dll");
"MainAssembly.dll"); // TODO: change to config option for other games
#region Virtualize Assembly-CSharp.dll
{
CriticalSection.EnterExecuteSection();
var ascModule = VirtualizedModule.Load(ascPath);
ascModule.Virtualize(cAsmName, () => bkp?.Add(ascPath));
try
{
var ascModule = VirtualizedModule.Load(ascPath);
ascModule.Virtualize(cAsmName, () => bkp?.Add(ascPath));
}
catch (Exception e)
{
loader.Error($"Could not virtualize {ascPath}");
loader.Error(e);
}
CriticalSection.ExitExecuteSection();
}


Loading…
Cancel
Save