summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--video/out/x11_common.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/video/out/x11_common.c b/video/out/x11_common.c
index 0ce669df6f..04f475ec5f 100644
--- a/video/out/x11_common.c
+++ b/video/out/x11_common.c
@@ -365,10 +365,15 @@ static void xrandr_read(struct vo_x11_state *x11)
continue;
if (x11->num_displays >= MAX_DISPLAYS)
continue;
+ double vTotal = m.vTotal;
+ if (m.modeFlags & RR_DoubleScan)
+ vTotal *= 2;
+ if (m.modeFlags & RR_Interlace)
+ vTotal /= 2;
struct xrandr_display d = {
.rc = { crtc->x, crtc->y,
crtc->x + crtc->width, crtc->y + crtc->height },
- .fps = m.dotClock / (m.hTotal * (double)m.vTotal),
+ .fps = m.dotClock / (m.hTotal * vTotal),
};
int num = x11->num_displays++;
MP_VERBOSE(x11, "Display %d: [%d, %d, %d, %d] @ %f FPS\n",