vlc/vlc-2.0 | branch: master | Felix Paul Kühne <[email protected]> | Fri Apr 6 13:09:12 2012 +0200| [8f9542684d5f55676da352fd705c55786d83ea95] | committer: Felix Paul Kühne
vout_macosx: slightly improve the resize behavior in a few corner cases (refs #6427) (cherry picked from commit 25cf83bcace12d19b4980140037096a0b57bcd87) > http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=8f9542684d5f55676da352fd705c55786d83ea95 --- modules/video_output/macosx.m | 22 ++++++++++++++++++++-- 1 files changed, 20 insertions(+), 2 deletions(-) diff --git a/modules/video_output/macosx.m b/modules/video_output/macosx.m index 683ac92..04a1bb0 100644 --- a/modules/video_output/macosx.m +++ b/modules/video_output/macosx.m @@ -405,9 +405,27 @@ static int Control (vout_display_t *vd, int query, va_list ap) } 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 *); - i_width = cfg->display.width; - i_height = cfg->display.height; + is_forced = (bool)va_arg (ap, int); + + 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 */ _______________________________________________ vlc-commits mailing list [email protected] http://mailman.videolan.org/listinfo/vlc-commits
