[host] nvfbc: fix inverted truncated frame logic

This commit is contained in:
Geoffrey McRae 2022-05-04 11:58:04 +10:00
parent 7b7a06b63f
commit d5e2689d64

View File

@ -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;