[vlc-commits] macosx vout: fix vertical picture alignment

David Fuhrmann git at videolan.org
Sun Apr 15 22:19:56 CEST 2012


vlc | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Sun Apr 15 21:06:31 2012 +0200| [2f9de9352d04f834e585aa2f20716735f0fa4f7c] | committer: David Fuhrmann

macosx vout: fix vertical picture alignment

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

 modules/video_output/macosx.m |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/modules/video_output/macosx.m b/modules/video_output/macosx.m
index 26849e0..e278113 100644
--- a/modules/video_output/macosx.m
+++ b/modules/video_output/macosx.m
@@ -413,7 +413,8 @@ static int Control (vout_display_t *vd, int query, va_list ap)
                This has the positive side effect that we avoid erratic sizing as we animate every resize. */
             if (query != VOUT_DISPLAY_CHANGE_DISPLAY_SIZE)
             {
-                glViewport (place.x, place.y, place.width, place.height);
+                // x / y are top left corner, but we need the lower left one
+                glViewport (place.x, cfg_tmp.display.height - (place.y + place.height), place.width, place.height);
             }
 
             // this should not be needed, but currently it improves crop somehow, when we are in fullscreen
@@ -655,7 +656,8 @@ static void OpenglSwap(vlc_gl_t *gl)
     }
 
     if ([self lockgl]) {
-        glViewport (place.x, place.y, place.width, place.height);
+        // x / y are top left corner, but we need the lower left one
+        glViewport (place.x, bounds.size.height - (place.y + place.height), place.width, place.height);
 
         @synchronized(self) {
             // This may be cleared before -drawRect is being called,



More information about the vlc-commits mailing list