Rename wonFrame to endFrame to Fit Codebase Semantics

This commit is contained in:
copecone committed 2026-08-20 10:21:14 +09:00
1 parent 003319fa26
commit 5ffd73052d
2 files changed
+7 -7

No files matched your search

+5 -5
View File
@@ -121,7 +121,7 @@ internal class RenderManager : MonoBehaviour
public long passCount; public long passCount;
public bool endRequested; public bool endRequested;
public bool endSuccessful; public bool endSuccessful;
public long wonFrame = -1; public long endFrame = -1;
// Private Instance Fields // Private Instance Fields
private FFmpegNativeEncoder? _activeVideoFFmpeg; private FFmpegNativeEncoder? _activeVideoFFmpeg;
@@ -235,7 +235,7 @@ internal class RenderManager : MonoBehaviour
StartRendering(); StartRendering();
countdown = 3; countdown = 3;
wonFrame = -1; endFrame = -1;
if (!_escapeHandlerObj) if (!_escapeHandlerObj)
{ {
@@ -257,14 +257,14 @@ internal class RenderManager : MonoBehaviour
} }
else if (RenderContext.EndCondition()) else if (RenderContext.EndCondition())
{ {
if (wonFrame == -1) if (endFrame == -1)
{ {
wonFrame = frameCount; endFrame = frameCount;
} }
var extraFrames = (long)Math.Ceiling(Configuration.DelayAfterEnd * Configuration.RenderFPS); var extraFrames = (long)Math.Ceiling(Configuration.DelayAfterEnd * Configuration.RenderFPS);
if (frameCount - wonFrame < extraFrames) return; if (frameCount - endFrame < extraFrames) return;
ResetRenderState(success: true); ResetRenderState(success: true);
StopFFmpeg(true); StopFFmpeg(true);
} }
+2 -2
View File
@@ -23,9 +23,9 @@ public static class scrShowIfDebugPatch
{ {
if (RenderManager.Instance.countdown > 0) ___txt.text = $"Render in {RenderManager.Instance.countdown}s.."; 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; var remainingTime = RenderManager.Instance.Configuration.DelayAfterEnd - elapsedFrames / RenderManager.Instance.Configuration.RenderFPS;
if (remainingTime < 0) remainingTime = 0; if (remainingTime < 0) remainingTime = 0;
___txt.text += $"\nWaiting for {remainingTime:F1}s.."; ___txt.text += $"\nWaiting for {remainingTime:F1}s..";