Fixed mirrored display of shared screen in video calls.

This commit is contained in:
23rd 2022-12-12 23:32:51 +03:00 committed by John Preston
parent ca1c826c5c
commit 40443b7547
3 changed files with 7 additions and 1 deletions

View file

@ -407,6 +407,7 @@ void Panel::reinitWithCall(Call *call) {
const auto active = _call->isSharingScreen();
_screencast->setProgress(active ? 0. : 1.);
_screencast->setText(tr::lng_call_screencast());
_outgoingVideoBubble->setMirrored(!active);
}
}, _callLifetime);

View file

@ -152,7 +152,7 @@ void VideoBubble::prepareFrame() {
.resize = size,
.outer = size,
};
const auto frame = _track->frame(request);
const auto frame = _track->frame(request).mirrored(!_mirrored, false);
if (_frame.width() < size.width() || _frame.height() < size.height()) {
_frame = QImage(
size * cIntRetinaFactor(),

View file

@ -37,6 +37,10 @@ public:
return _content.lifetime();
}
void setMirrored(bool mirrored) {
_mirrored = mirrored;
}
private:
void setup();
void paint();
@ -59,6 +63,7 @@ private:
RectPart _corner = RectPart::None;
bool _dragging = false;
bool _geometryDirty = false;
bool _mirrored = true;
};