From 112f049d510781bc5f31585a534610ef40fb2be059a11741c5048e09215a097b Mon Sep 17 00:00:00 2001 From: copecone Date: Thu, 28 May 2026 20:23:57 +0900 Subject: [PATCH] Add Support for Async Input Autoplay --- Patch/Engine/AsyncInputPatches.cs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Patch/Engine/AsyncInputPatches.cs diff --git a/Patch/Engine/AsyncInputPatches.cs b/Patch/Engine/AsyncInputPatches.cs new file mode 100644 index 0000000..d9fcc6e --- /dev/null +++ b/Patch/Engine/AsyncInputPatches.cs @@ -0,0 +1,21 @@ +using ADOFAIRenderer.Core; +using HarmonyLib; + +namespace ADOFAIRenderer.Patch.Engine +{ + [HarmonyPatch(typeof(AsyncInputUtils), "UpdateOffsetTime")] + // ReSharper disable once InconsistentNaming + public static class AsyncInputPatches + { + [HarmonyPrefix] + // ReSharper disable once InconsistentNaming + public static bool Prefix(long fixDivider) + { + if (!RenderManager.IsActive) return true; + // Force offsetTick to match instantly without 1/100 damping division when rendering + AsyncInputManager.offsetTick = AsyncInputManager.currFrameTick - (ulong)(scrConductor.instance.dspTime * 10000000.0); + AsyncInputManager.offsetTickUpdated = true; + return false; // Skip the original damped offset calculation + } + } +}