[vlc-commits] macos vout: implement VOUT_DISPLAY_CHANGE_DISPLAY_FILLED as it seems to be intended
David Fuhrmann
git at videolan.org
Wed Mar 21 17:59:35 CET 2012
vlc/vlc-2.0 | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Wed Mar 21 17:12:36 2012 +0100| [018c77f710f3d9b60d09e355ea201f79b8527cc6] | committer: David Fuhrmann
macos vout: implement VOUT_DISPLAY_CHANGE_DISPLAY_FILLED as it seems to be intended
(cherry picked from commit e6820b6113e28172fe2ad590829ad7a7395cabaa)
Signed-off-by: David Fuhrmann <david.fuhrmann at googlemail.com>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=018c77f710f3d9b60d09e355ea201f79b8527cc6
---
modules/video_output/macosx.m | 19 ++++++++++++-------
1 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/modules/video_output/macosx.m b/modules/video_output/macosx.m
index bcf8eaa..d0fafcb 100644
--- a/modules/video_output/macosx.m
+++ b/modules/video_output/macosx.m
@@ -328,10 +328,6 @@ static int Control (vout_display_t *vd, int query, va_list ap)
return VLC_SUCCESS;
}
case VOUT_DISPLAY_CHANGE_DISPLAY_FILLED:
- {
- [[sys->glView window] performSelectorOnMainThread:@selector(performZoom:) withObject: nil waitUntilDone:NO];
- return VLC_SUCCESS;
- }
case VOUT_DISPLAY_CHANGE_ZOOM:
case VOUT_DISPLAY_CHANGE_SOURCE_ASPECT:
case VOUT_DISPLAY_CHANGE_SOURCE_CROP:
@@ -676,8 +672,17 @@ static void OpenglSwap(vlc_gl_t *gl)
NSRect bounds = [self bounds];
- CGFloat height = bounds.size.height;
- CGFloat width = bounds.size.width;
+ CGFloat height, width;
+ if( !vd || ( vd && vd->cfg->is_display_filled ))
+ {
+ height = bounds.size.height;
+ width = bounds.size.width;
+ }
+ else
+ {
+ height = vd->source.i_visible_height;
+ width = vd->source.i_visible_width;
+ }
GLint x = width, y = height;
@@ -703,7 +708,7 @@ static void OpenglSwap(vlc_gl_t *gl)
}
if ([self lockgl]) {
- glViewport((width - x) / 2, (height - y) / 2, x, y);
+ glViewport((bounds.size.width - x) / 2, (bounds.size.height - y) / 2, x, y);
@synchronized(self) {
// This may be cleared before -drawRect is being called,
More information about the vlc-commits
mailing list