Initial Commit

This commit is contained in:
copecone committed 2026-05-21 11:38:31 +09:00
commit 44a22ae103
19 files changed
+772

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
using System.Diagnostics.CodeAnalysis;
using HarmonyLib;
using UnityEngine;
namespace ADOFAIRenderer.Patch
{
[HarmonyPatch(typeof(scrCamera), "SetCustomFrameRate")]
public class SetCustomFrameRatePatch
{
[SuppressMessage("ReSharper", "InconsistentNaming")]
private static bool Prefix(scrCamera __instance, bool enable, float frame, ref MeshRenderer ___camQuadMesh, ref RenderTexture ___camRT)
{
// There is an issue that `mainTexture.Release` triggers even if `mainTexture` is `camRT`, so mod tries to fix it
if (enable || __instance.enableCustomFPS != enable) return true;
__instance.enableCustomFPS = enable;
__instance.frameRate = frame;
return false;
}
}
}