diff --git a/Core/RenderManager.cs b/Core/RenderManager.cs index 40a0e16..6683193 100644 --- a/Core/RenderManager.cs +++ b/Core/RenderManager.cs @@ -121,7 +121,7 @@ internal class RenderManager : MonoBehaviour public long passCount; public bool endRequested; public bool endSuccessful; - public long wonFrame = -1; + public long endFrame = -1; // Private Instance Fields private FFmpegNativeEncoder? _activeVideoFFmpeg; @@ -235,7 +235,7 @@ internal class RenderManager : MonoBehaviour StartRendering(); countdown = 3; - wonFrame = -1; + endFrame = -1; if (!_escapeHandlerObj) { @@ -257,14 +257,14 @@ internal class RenderManager : MonoBehaviour } else if (RenderContext.EndCondition()) { - if (wonFrame == -1) + if (endFrame == -1) { - wonFrame = frameCount; + endFrame = frameCount; } var extraFrames = (long)Math.Ceiling(Configuration.DelayAfterEnd * Configuration.RenderFPS); - if (frameCount - wonFrame < extraFrames) return; + if (frameCount - endFrame < extraFrames) return; ResetRenderState(success: true); StopFFmpeg(true); } diff --git a/Patch/Game/scrShowIfDebugPatch.cs b/Patch/Game/scrShowIfDebugPatch.cs index b85a52c..c6e996e 100644 --- a/Patch/Game/scrShowIfDebugPatch.cs +++ b/Patch/Game/scrShowIfDebugPatch.cs @@ -23,9 +23,9 @@ public static class scrShowIfDebugPatch { if (RenderManager.Instance.countdown > 0) ___txt.text = $"Render in {RenderManager.Instance.countdown}s.."; - if (RenderManager.Instance.wonFrame != -1) + if (RenderManager.Instance.endFrame != -1) { - var elapsedFrames = RenderManager.Instance.frameCount - RenderManager.Instance.wonFrame; + var elapsedFrames = RenderManager.Instance.frameCount - RenderManager.Instance.endFrame; var remainingTime = RenderManager.Instance.Configuration.DelayAfterEnd - elapsedFrames / RenderManager.Instance.Configuration.RenderFPS; if (remainingTime < 0) remainingTime = 0; ___txt.text += $"\nWaiting for {remainingTime:F1}s..";