mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Fixed mirrored display of shared screen in video calls.
This commit is contained in:
parent
ca1c826c5c
commit
40443b7547
3 changed files with 7 additions and 1 deletions
|
@ -407,6 +407,7 @@ void Panel::reinitWithCall(Call *call) {
|
||||||
const auto active = _call->isSharingScreen();
|
const auto active = _call->isSharingScreen();
|
||||||
_screencast->setProgress(active ? 0. : 1.);
|
_screencast->setProgress(active ? 0. : 1.);
|
||||||
_screencast->setText(tr::lng_call_screencast());
|
_screencast->setText(tr::lng_call_screencast());
|
||||||
|
_outgoingVideoBubble->setMirrored(!active);
|
||||||
}
|
}
|
||||||
}, _callLifetime);
|
}, _callLifetime);
|
||||||
|
|
||||||
|
|
|
@ -152,7 +152,7 @@ void VideoBubble::prepareFrame() {
|
||||||
.resize = size,
|
.resize = size,
|
||||||
.outer = 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()) {
|
if (_frame.width() < size.width() || _frame.height() < size.height()) {
|
||||||
_frame = QImage(
|
_frame = QImage(
|
||||||
size * cIntRetinaFactor(),
|
size * cIntRetinaFactor(),
|
||||||
|
|
|
@ -37,6 +37,10 @@ public:
|
||||||
return _content.lifetime();
|
return _content.lifetime();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setMirrored(bool mirrored) {
|
||||||
|
_mirrored = mirrored;
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void setup();
|
void setup();
|
||||||
void paint();
|
void paint();
|
||||||
|
@ -59,6 +63,7 @@ private:
|
||||||
RectPart _corner = RectPart::None;
|
RectPart _corner = RectPart::None;
|
||||||
bool _dragging = false;
|
bool _dragging = false;
|
||||||
bool _geometryDirty = false;
|
bool _geometryDirty = false;
|
||||||
|
bool _mirrored = true;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue