From d5e2689d64941eb92aca43f458486fe361ec6c2c Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Wed, 4 May 2022 11:58:04 +1000 Subject: [PATCH] [host] nvfbc: fix inverted truncated frame logic --- host/platform/Windows/capture/NVFBC/src/nvfbc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/host/platform/Windows/capture/NVFBC/src/nvfbc.c b/host/platform/Windows/capture/NVFBC/src/nvfbc.c index db7ce8d5..73d63d0d 100644 --- a/host/platform/Windows/capture/NVFBC/src/nvfbc.c +++ b/host/platform/Windows/capture/NVFBC/src/nvfbc.c @@ -560,8 +560,9 @@ static CaptureResult nvfbc_waitFrame(CaptureFrame * frame, frame->screenWidth = this->grabWidth; frame->screenHeight = this->grabHeight; frame->frameWidth = this->grabWidth; - frame->truncated = maxHeight > this->grabHeight; - frame->frameHeight = maxHeight > this->grabHeight ? this->grabHeight : maxHeight; + frame->frameHeight = maxHeight < this->grabHeight ? + maxHeight : this->grabHeight; + frame->truncated = maxHeight < this->grabHeight; frame->pitch = this->shmStride * 4; frame->stride = this->shmStride; frame->rotation = CAPTURE_ROT_0;