1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-25 16:33:02 +00:00

Apply autofit-larger after autofit-smaller

This prevents the window scaling beyond screen dimensions

Fixes #3753
This commit is contained in:
Nils Maier 2016-10-30 14:38:26 +01:00 committed by Martin Herkt
parent 3f5b41dfa3
commit 7c9f32620f
No known key found for this signature in database
GPG Key ID: C24B9CD04DC6AE7F

View File

@ -101,8 +101,8 @@ void vo_calc_window_geometry(struct vo *vo, const struct mp_rect *screen,
calc_monitor_aspect(opts, scr_w, scr_h, &out_geo->monitor_par, &d_w, &d_h);
apply_autofit(&d_w, &d_h, scr_w, scr_h, &opts->autofit, true, true);
apply_autofit(&d_w, &d_h, scr_w, scr_h, &opts->autofit_larger, false, true);
apply_autofit(&d_w, &d_h, scr_w, scr_h, &opts->autofit_smaller, true, false);
apply_autofit(&d_w, &d_h, scr_w, scr_h, &opts->autofit_larger, false, true);
out_geo->win.x0 = (int)(scr_w - d_w) / 2;
out_geo->win.y0 = (int)(scr_h - d_h) / 2;