Commit 0d1b820c authored by David Fuhrmann's avatar David Fuhrmann Committed by Felix Paul Kühne

macosx: fixes aspect ratio / crop functionality in some cases

With this commit the mentioned features result in an actual change, when we are in fullscreen or "macosx-video-autoresize" is false.
Furthermore, this fixes nasty flickering when normal window is changed in size while using this features.
Also this commit makes sure, that no window resize is happening in any case, when "macosx-video-autoresize" is false.
Signed-off-by: default avatarFelix Paul Kühne <fkuehne@videolan.org>
(cherry picked from commit fa7456d3cddcfc2ad238ac3102463eef84d134a6)
parent a13d32fb
......@@ -331,16 +331,19 @@ static int Control (vout_display_t *vd, int query, va_list ap)
[[sys->glView window] performSelectorOnMainThread:@selector(zoom:) withObject: nil waitUntilDone:NO];
return VLC_SUCCESS;
}
case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE:
case VOUT_DISPLAY_CHANGE_ZOOM:
case VOUT_DISPLAY_CHANGE_SOURCE_ASPECT:
case VOUT_DISPLAY_CHANGE_SOURCE_CROP:
{
if (query == VOUT_DISPLAY_CHANGE_DISPLAY_SIZE)
{
if (!config_GetInt( vd, "macosx-video-autoresize" ))
return VLC_SUCCESS;
}
return VLC_SUCCESS;
}
case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE:
{
[sys->glView performSelectorOnMainThread:@selector(reshapeView:) withObject:nil waitUntilDone:NO];
if (!config_GetInt( vd, "macosx-video-autoresize" ))
return VLC_SUCCESS;
NSAutoreleasePool * o_pool = [[NSAutoreleasePool alloc] init];
NSPoint topleftbase;
NSPoint topleftscreen;
......@@ -598,6 +601,11 @@ static void OpenglSwap(vlc_gl_t *gl)
glClear(GL_COLOR_BUFFER_BIT);
}
- (void)reshapeView:(id)sender
{
[self reshape];
}
/**
* Method called by Cocoa when the view is resized.
*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment