SHA256
Add Support for Async Input Autoplay
This commit is contained in:
1 parent
055ffc1b19
commit
112f049d51
1 file changed
+21
@@ -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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in new issue
Block a user