Commit 25cf83bc authored by Felix Paul Kühne's avatar Felix Paul Kühne

vout_macosx: slightly improve the resize behavior in a few corner cases (refs #6427)

parent 28a17b3a
...@@ -405,9 +405,27 @@ static int Control (vout_display_t *vd, int query, va_list ap) ...@@ -405,9 +405,27 @@ static int Control (vout_display_t *vd, int query, va_list ap)
} }
else else
{ {
const vout_display_cfg_t *cfg;
const video_format_t *source;
bool is_forced = false;
source = &vd->source;
cfg = (const vout_display_cfg_t*)va_arg (ap, const vout_display_cfg_t *); cfg = (const vout_display_cfg_t*)va_arg (ap, const vout_display_cfg_t *);
i_width = cfg->display.width; is_forced = (bool)va_arg (ap, int);
i_height = cfg->display.height;
if (query == VOUT_DISPLAY_CHANGE_DISPLAY_SIZE
&& is_forced
&& (cfg->display.width != vd->cfg->display.width
||cfg->display.height != vd->cfg->display.height)
&& vout_window_SetSize (sys->embed,
cfg->display.width,
cfg->display.height))
return VLC_EGENERIC;
vout_display_place_t place;
vout_display_PlacePicture (&place, source, cfg, false);
i_width = place.width;
i_height = place.height;
} }
/* Calculate the window's new size, if it is larger than our minimal size */ /* Calculate the window's new size, if it is larger than our minimal size */
......
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