Commit e01621b2 authored by Felix Paul Kühne's avatar Felix Paul Kühne

legacy OSX intf: correctly adapt vout window's size to video content

parent 4647e341
...@@ -284,7 +284,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable, ...@@ -284,7 +284,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
- (void)updateTitle - (void)updateTitle
{ {
NSString * o_title = nil; NSString * o_title = nil;
NSMutableString * o_mrl = nil; NSMutableString * o_mrl = nil;
input_thread_t * p_input; input_thread_t * p_input;
char * psz_title; char * psz_title;
...@@ -804,7 +804,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable, ...@@ -804,7 +804,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
i_time_mouse_last_moved = mdate(); i_time_mouse_last_moved = mdate();
o_window = [[VLCVoutWindow alloc] initWithVout: p_arg_vout view: self o_window = [[VLCVoutWindow alloc] initWithVout: p_arg_vout view: self
frame: s_arg_frame]; frame: s_arg_frame];
[self updateTitle]; [self updateTitle];
if([self isFullscreen]) if([self isFullscreen])
[o_window performSelectorOnMainThread: @selector(enterFullscreen) withObject: NULL waitUntilDone: YES]; [o_window performSelectorOnMainThread: @selector(enterFullscreen) withObject: NULL waitUntilDone: YES];
...@@ -947,7 +947,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable, ...@@ -947,7 +947,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
/* o_window needs to point to our o_embeddedwindow, super might have set it /* o_window needs to point to our o_embeddedwindow, super might have set it
* to the fullscreen window that o_embeddedwindow setups during fullscreen */ * to the fullscreen window that o_embeddedwindow setups during fullscreen */
o_window = o_embeddedwindow; o_window = o_embeddedwindow;
if( b_return ) if( b_return )
{ {
[o_window lockFullscreenAnimation]; [o_window lockFullscreenAnimation];
...@@ -962,8 +962,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable, ...@@ -962,8 +962,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
if ([o_window isVisible] && (![o_window isFullscreen])) if ([o_window isVisible] && (![o_window isFullscreen]))
[o_window makeKeyAndOrderFront: self]; [o_window makeKeyAndOrderFront: self];
if ( [self window] != o_embeddedwindow ) [self scaleWindowWithFactor: 1.0 animate: [o_window isVisible] && (![o_window isFullscreen])];
[self scaleWindowWithFactor: 1.0 animate: [o_window isVisible] && (![o_window isFullscreen])];
[o_embeddedwindow setVideoRatio:[self voutSizeForFactor:1.0]]; [o_embeddedwindow setVideoRatio:[self voutSizeForFactor:1.0]];
......
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