debug: check if captured frame has non-zero data

This commit is contained in:
emil28092005
2026-06-19 09:09:29 +03:00
parent 277c8aea93
commit 2daf10b3b1
2 changed files with 10 additions and 0 deletions
@@ -268,6 +268,16 @@ public sealed unsafe class VulkanRenderer : IRenderer, Engine.Graphics.IScreensh
if (IsRecording)
{
CapturedFrame = ReadCapturedBuffer();
if (CapturedFrame != null && CapturedFrame.Length > 0)
{
// Check if data is not all zeros
bool hasData = false;
for (int i = 0; i < CapturedFrame.Length; i += 4096)
{
if (CapturedFrame[i] != 0) { hasData = true; break; }
}
if (!hasData) CapturedFrame = null;
}
}
uint imageIndex;