vlc | branch: master | David Fuhrmann <[email protected]> | Sat May 18 
12:51:16 2019 +0200| [77dedc587367a83999ef0c3980e103d7e2a52baf] | committer: 
David Fuhrmann

macosx vout: Always call glViewport on macOS 10.14

macOS 10.14 can unexpectedly change the viewport, e.g. when opening
some main menus. This also improves AR when compiled with the 10.14
SDK, here the AR was always broken until now.

fixes #22209

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

 modules/video_output/macosx.m | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/modules/video_output/macosx.m b/modules/video_output/macosx.m
index 37bde8d1bf..2d69c0a08a 100644
--- a/modules/video_output/macosx.m
+++ b/modules/video_output/macosx.m
@@ -335,6 +335,14 @@ static void PictureDisplay (vout_display_t *vd, picture_t 
*pic)
     [sys->glView setVoutFlushing:YES];
     if (vlc_gl_MakeCurrent(sys->gl) == VLC_SUCCESS)
     {
+        if (@available(macOS 10.14, *)) {
+            vout_display_place_t place;
+            vout_display_PlacePicture(&place, &vd->source, &sys->cfg);
+            vout_display_opengl_Viewport(vd->sys->vgl, place.x,
+                                         sys->cfg.display.height - (place.y + 
place.height),
+                                         place.width, place.height);
+        }
+
         vout_display_opengl_Display (sys->vgl, &vd->source);
         vlc_gl_ReleaseCurrent(sys->gl);
     }

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to