Upload files to "/"

This commit is contained in:
Deez committed 2026-11-26 14:48:54 -05:00
1 parent 3c7545da22
commit 20f1e294dd
5 files changed
+100

No files matched your search

+36
View File
@@ -0,0 +1,36 @@
using HarmonyLib;
using System.Reflection;
namespace GorillaCaptions
{
public class HarmonyPatches
{
private static Harmony instance;
public static bool IsPatched { get; private set; }
public const string InstanceId = Constants.Guid;
internal static void ApplyHarmonyPatches()
{
if (!IsPatched)
{
if (instance == null)
{
instance = new Harmony(InstanceId);
}
instance.PatchAll(Assembly.GetExecutingAssembly());
IsPatched = true;
}
}
internal static void RemoveHarmonyPatches()
{
if (instance != null && IsPatched)
{
instance.UnpatchSelf();
IsPatched = false;
}
}
}
}