[host] xcb/pipewire/nfbc: use min and correct inverted logic

This commit is contained in:
Geoffrey McRae
2022-05-04 12:23:20 +10:00
parent d5e2689d64
commit 60834a5719
3 changed files with 7 additions and 6 deletions

View File

@@ -428,8 +428,8 @@ static CaptureResult pipewire_waitFrame(CaptureFrame * frame,
frame->screenWidth = this->width;
frame->screenHeight = this->height;
frame->frameWidth = this->width;
frame->frameHeight = maxHeight > this->height ? this->height : maxHeight;
frame->truncated = maxHeight > this->height;
frame->frameHeight = min(maxHeight, this->height);
frame->truncated = maxHeight < this->height;
frame->pitch = this->width * bpp;
frame->stride = this->width;
frame->rotation = CAPTURE_ROT_0;