summaryrefslogtreecommitdiffstats
path: root/video/out
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2022-05-04 16:26:33 -0500
committerDudemanguy <random342@airmail.cc>2022-05-05 13:03:43 +0000
commit76f888f5551f486b6d0c9b9c3a0f17e1e0bf9d71 (patch)
tree8a3c84c87fbc2797481703fd080bfea4db246f2e /video/out
parent6f7a0675b0ebfdc444084a6f5137bb0552c1e5de (diff)
downloadmpv-76f888f5551f486b6d0c9b9c3a0f17e1e0bf9d71.tar.bz2
mpv-76f888f5551f486b6d0c9b9c3a0f17e1e0bf9d71.tar.xz
context_drm_egl: support monitor par
These values and options were simply never looked at in the drm egl context. This pretty much is just a copy and paste of what is in vo_drm. Fixes #10157.
Diffstat (limited to 'video/out')
-rw-r--r--video/out/opengl/context_drm_egl.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/video/out/opengl/context_drm_egl.c b/video/out/opengl/context_drm_egl.c
index 86292b04cf..34d6970c95 100644
--- a/video/out/opengl/context_drm_egl.c
+++ b/video/out/opengl/context_drm_egl.c
@@ -968,6 +968,15 @@ static bool drm_egl_init(struct ra_ctx *ctx)
ra_add_native_resource(ctx->ra, "drm_params_v2", &p->drm_params);
ra_add_native_resource(ctx->ra, "drm_draw_surface_size", &p->draw_surface_size);
+ if (ctx->vo->opts->force_monitor_aspect != 0.0) {
+ ctx->vo->monitor_par = p->fb->width / (double) p->fb->height /
+ ctx->vo->opts->force_monitor_aspect;
+ } else {
+ ctx->vo->monitor_par = 1 / ctx->vo->opts->monitor_pixel_aspect;
+ }
+
+ mp_verbose(ctx->vo->log, "Monitor pixel aspect: %g\n", ctx->vo->monitor_par);
+
p->vsync_info.vsync_duration = 0;
p->vsync_info.skipped_vsyncs = -1;
p->vsync_info.last_queue_display_time = -1;