Apply Better Handling of Render Cancel

This commit is contained in:
copecone committed 2026-05-27 15:50:09 +09:00
1 parent 42741c2cb2
commit 379c0360d7
2 files changed
+6 -12

No files matched your search

+2 -9
View File
@@ -45,14 +45,7 @@ namespace ADOFAIRenderer.Util
lock (_poolLock)
{
if (_statePool.Count == 0)
{
state = new ReadbackRequestState(this);
}
else
{
state = _statePool.Pop();
}
state = _statePool.Count == 0 ? new ReadbackRequestState(this) : _statePool.Pop();
}
var bufferSize = texture.width * texture.height * 4; // RGBA = 4 channel
@@ -70,7 +63,7 @@ namespace ADOFAIRenderer.Util
{
var frame = state.FrameIndex;
if (!RenderMod.IsCapturing)
if (RenderManager.IsRenderCancelled)
{
RecycleState(state);
return;