mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-08-06 10:44:01 +00:00
[host] xcb/pipewire/nfbc: use min
and correct inverted logic
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
|
||||
#include "interface/capture.h"
|
||||
#include "interface/platform.h"
|
||||
#include "common/util.h"
|
||||
#include "common/option.h"
|
||||
#include "common/debug.h"
|
||||
#include "common/event.h"
|
||||
@@ -273,8 +274,8 @@ static CaptureResult xcb_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 * 4;
|
||||
frame->stride = this->width;
|
||||
frame->format = CAPTURE_FMT_BGRA;
|
||||
|
Reference in New Issue
Block a user