diff --git a/Telegram/SourceFiles/calls/calls_panel.cpp b/Telegram/SourceFiles/calls/calls_panel.cpp index 5b820c30c..e1ac777bc 100644 --- a/Telegram/SourceFiles/calls/calls_panel.cpp +++ b/Telegram/SourceFiles/calls/calls_panel.cpp @@ -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); diff --git a/Telegram/SourceFiles/calls/calls_video_bubble.cpp b/Telegram/SourceFiles/calls/calls_video_bubble.cpp index 476d6cb3d..aecabfd55 100644 --- a/Telegram/SourceFiles/calls/calls_video_bubble.cpp +++ b/Telegram/SourceFiles/calls/calls_video_bubble.cpp @@ -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(), diff --git a/Telegram/SourceFiles/calls/calls_video_bubble.h b/Telegram/SourceFiles/calls/calls_video_bubble.h index db6a6a86f..f7556775f 100644 --- a/Telegram/SourceFiles/calls/calls_video_bubble.h +++ b/Telegram/SourceFiles/calls/calls_video_bubble.h @@ -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; };