From 1648ff8a0f18e1c1a5e979084148cc7ecf195984 Mon Sep 17 00:00:00 2001 From: rr- Date: Mon, 3 Oct 2016 23:56:35 +0200 Subject: vo_drm: refactor getting display fps Reduces code duplication between OpenGL backend and DRM VO. (The control() for OpenGL backend isn't sufficiently similar to the VO's control() to consider merging it as a whole - I extracted only the FPS code.) --- video/out/vo_drm.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'video/out/vo_drm.c') diff --git a/video/out/vo_drm.c b/video/out/vo_drm.c index cf42c4ce4a..7b05def934 100644 --- a/video/out/vo_drm.c +++ b/video/out/vo_drm.c @@ -482,11 +482,7 @@ static int control(struct vo *vo, uint32_t request, void *arg) reconfig(vo, vo->params); return VO_TRUE; case VOCTRL_GET_DISPLAY_FPS: { - double fps = - p->kms->mode.clock - * 1000.0 - / p->kms->mode.htotal - / p->kms->mode.vtotal; + double fps = kms_get_display_fps(p->kms); if (fps <= 0) break; *(double*)arg = fps; -- cgit v1.2.3