[vlc-commits] caopengllayer: correct vertical alignment

Victorien Le Couviour--Tuffet git at videolan.org
Mon Aug 7 18:04:13 CEST 2017


vlc | branch: master | Victorien Le Couviour--Tuffet <victorien.lecouviour.tuffet at gmail.com> | Fri Aug  4 19:41:11 2017 +0200| [94574a225588f931aa6181c3328d3b9cd4f5ef40] | committer: Jean-Baptiste Kempf

caopengllayer: correct vertical alignment

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=94574a225588f931aa6181c3328d3b9cd4f5ef40
---

 modules/video_output/caopengllayer.m | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/modules/video_output/caopengllayer.m b/modules/video_output/caopengllayer.m
index c16687c1a0..90b41f517e 100644
--- a/modules/video_output/caopengllayer.m
+++ b/modules/video_output/caopengllayer.m
@@ -348,6 +348,12 @@ static int Control (vout_display_t *vd, int query, va_list ap)
             cfg_tmp.display.width = bounds.size.width;
             cfg_tmp.display.height = bounds.size.height;
 
+            /* Reverse vertical alignment as the GL tex are Y inverted */
+            if (cfg_tmp.align.vertical == VOUT_DISPLAY_ALIGN_TOP)
+                cfg_tmp.align.vertical = VOUT_DISPLAY_ALIGN_BOTTOM;
+            else if (cfg_tmp.align.vertical == VOUT_DISPLAY_ALIGN_BOTTOM)
+                cfg_tmp.align.vertical = VOUT_DISPLAY_ALIGN_TOP;
+
             vout_display_place_t place;
             vout_display_PlacePicture (&place, &vd->source, &cfg_tmp, false);
             if (OpenglLock(sys->gl))



More information about the vlc-commits mailing list