summaryrefslogtreecommitdiffstats
path: root/player/command.c
diff options
context:
space:
mode:
Diffstat (limited to 'player/command.c')
-rw-r--r--player/command.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/player/command.c b/player/command.c
index 6e8679d1ad..04d5e076ae 100644
--- a/player/command.c
+++ b/player/command.c
@@ -2333,6 +2333,12 @@ static int mp_property_current_window_scale(void *ctx, struct m_property *prop,
if (params.rotate % 180 == 90 && (vo->driver->caps & VO_CAP_ROTATE90))
MPSWAP(int, vid_w, vid_h);
+ if (vo->monitor_par < 1) {
+ vid_h = MPCLAMP(vid_h / vo->monitor_par, 1, 16000);
+ } else {
+ vid_w = MPCLAMP(vid_w * vo->monitor_par, 1, 16000);
+ }
+
if (action == M_PROPERTY_SET) {
// Also called by update_window_scale as a NULL property.
double scale = *(double *)arg;