[vlc-commits] macosx vout: Always call glViewport on macOS 10.14
David Fuhrmann
git at videolan.org
Sat May 18 19:25:39 CEST 2019
vlc/vlc-3.0 | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Sat May 18 12:51:16 2019 +0200| [a8539f7e41e9086ff6a1a15c323044ef18031d9e] | 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/vlc-3.0.git/?a=commit;h=a8539f7e41e9086ff6a1a15c323044ef18031d9e
---
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 b9f19fcba8..df2f3030bb 100644
--- a/modules/video_output/macosx.m
+++ b/modules/video_output/macosx.m
@@ -339,6 +339,14 @@ static void PictureDisplay (vout_display_t *vd, picture_t *pic, subpicture_t *su
[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, vd->cfg, false);
+ vout_display_opengl_Viewport(vd->sys->vgl, place.x,
+ vd->cfg->display.height - (place.y + place.height),
+ place.width, place.height);
+ }
+
vout_display_opengl_Display (sys->vgl, &vd->source);
vlc_gl_ReleaseCurrent(sys->gl);
}
More information about the vlc-commits
mailing list