Skip to content
This repository has been archived by the owner on May 3, 2023. It is now read-only.

Commit

Permalink
release 1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Luxusio committed May 28, 2021
1 parent 038cd60 commit a60bd88
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions NoStopMod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ public static void EnableGC()
//NoStopMod.mod.Logger.Log("enablegc");
GarbageCollector.GCMode = GarbageCollector.Mode.Enabled;
System.Runtime.GCSettings.LatencyMode = System.Runtime.GCLatencyMode.Interactive;
GC.Collect();
} catch (NotImplementedException e)
{
NoStopMod.mod.Logger.Log("Exception occur");
Expand Down
22 changes: 22 additions & 0 deletions Patches/Patches.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,25 @@ public static void Postfix(scrController __instance)
}
}

[HarmonyPatch(typeof(scrController), "FailAction")]
public static class scrController_FailAction_Patch
{
private static void Prefix(scrController __instance)
{
NoStopMod.EnableGC();
}
}

[HarmonyPatch(typeof(scrController), "QuitToMainMenu")]
internal static class scrController_QuitToMainMenu_Patch
{
private static void Postfix(scrController __instance)
{
//NoStopMod.mod.Logger.Log("StartLoadingScene");
NoStopMod.EnableGC();
}
}

[HarmonyPatch(typeof(scrController), "ResetCustomLevel")]
internal static class scrController_ResetCustomLevel_Patch
{
Expand Down Expand Up @@ -82,6 +101,9 @@ private static void Postfix(scrController __instance)
}
}




[HarmonyPatch(typeof(scrUIController), "WipeToBlack")]
public static class scrUIController_WipeToBlack_Patch
{
Expand Down

0 comments on commit a60bd88

Please sign in to comment.