Commit 36faea58 authored by Eric Petit's avatar Eric Petit

macosx/voutgl.m: fixed --macosx-stretch in GL provider

parent 722b1c1a
...@@ -274,10 +274,19 @@ static void Swap( vout_thread_t * p_vout ) ...@@ -274,10 +274,19 @@ static void Swap( vout_thread_t * p_vout )
- (void) reshape - (void) reshape
{ {
int x, y; int x, y;
vlc_value_t val;
NSRect bounds = [self bounds]; NSRect bounds = [self bounds];
[[self openGLContext] makeCurrentContext]; [[self openGLContext] makeCurrentContext];
if( bounds.size.height * p_vout->render.i_aspect <
bounds.size.width * VOUT_ASPECT_FACTOR ) var_Get( p_vout, "macosx-stretch", &val );
if( val.b_bool )
{
x = bounds.size.width;
y = bounds.size.height;
}
else if( bounds.size.height * p_vout->render.i_aspect <
bounds.size.width * VOUT_ASPECT_FACTOR )
{ {
x = bounds.size.height * p_vout->render.i_aspect / VOUT_ASPECT_FACTOR; x = bounds.size.height * p_vout->render.i_aspect / VOUT_ASPECT_FACTOR;
y = bounds.size.height; y = bounds.size.height;
......
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