SHA256
Apply Better Handling of Render Cancel
This commit is contained in:
1 parent
42741c2cb2
commit
379c0360d7
2 files changed
+6
-12
No files matched your search
+2
-9
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user