SHA256
Refactor and Reorganize Patch Structure and Namespaces
This commit is contained in:
1 parent
c235da001c
commit
9514829040
14 files changed
+19
-18
No files matched your search
@@ -0,0 +1,21 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using HarmonyLib;
|
||||
|
||||
namespace ADOFAIRenderer.Patch.Game
|
||||
{
|
||||
[HarmonyPatch(typeof(scrCamera), "SetCustomFrameRate")]
|
||||
// ReSharper disable once InconsistentNaming
|
||||
public class scrCameraPatch
|
||||
{
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
private static bool Prefix(scrCamera __instance, bool enable, float frame)
|
||||
{
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user