From af3abae39d5d3c60d98dd2aee9e4d9b820318f8b Mon Sep 17 00:00:00 2001 From: Eric Petit Date: Thu, 13 May 2004 18:29:44 +0000 Subject: [PATCH] macosx/vout.m : fixed --macosx-fillscreen --- modules/gui/macosx/vout.m | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/modules/gui/macosx/vout.m b/modules/gui/macosx/vout.m index f40c98f502..6b18935b2a 100644 --- a/modules/gui/macosx/vout.m +++ b/modules/gui/macosx/vout.m @@ -1489,19 +1489,25 @@ CATCH_MOUSE_EVENTS f_x = 1.0; f_y = 1.0; } - /* Quad size is set in order to preserve the aspect ratio */ - else if( bounds.size.height * p_vout->output.i_aspect < - bounds.size.width * VOUT_ASPECT_FACTOR ) - { - f_x = bounds.size.height * p_vout->output.i_aspect / - VOUT_ASPECT_FACTOR / bounds.size.width; - f_y = 1.0; - } else { - f_x = 1.0; - f_y = bounds.size.width * VOUT_ASPECT_FACTOR / - p_vout->output.i_aspect / bounds.size.height; + /* Quad size is set in order to preserve the aspect ratio */ + int fill = ( config_GetInt( p_vout, "macosx-fill" ) && + p_vout->b_fullscreen ); + int large = ( bounds.size.height * p_vout->output.i_aspect < + bounds.size.width * VOUT_ASPECT_FACTOR ); + if( ( large && !fill ) || ( !large && fill ) ) + { + f_x = bounds.size.height * p_vout->output.i_aspect / + VOUT_ASPECT_FACTOR / bounds.size.width; + f_y = 1.0; + } + else + { + f_x = 1.0; + f_y = bounds.size.width * VOUT_ASPECT_FACTOR / + p_vout->output.i_aspect / bounds.size.height; + } } } -- 2.39.2