From 90737ec77d71ff9adbb953ac47f3d6b797bddf54 Mon Sep 17 00:00:00 2001 From: Jan Beich Date: Sat, 21 Sep 2019 20:54:24 +0000 Subject: drm_common: set frsig to a valid signal On FreeBSD and DragonFly kernel checks if `frsig` is valid and aborts with `EINVAL` if not. However, `frsig` was never implemented. $ build/mpv --gpu-context=drm /path/to/video.mkv [...] [vo/gpu] VT_SETMODE failed: Invalid argument [vo/gpu/opengl] Failed to set up VT switcher. Terminal switching will be unavailable. [...] --- video/out/drm_common.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'video') diff --git a/video/out/drm_common.c b/video/out/drm_common.c index 4a6349ebbe..64c84ca315 100644 --- a/video/out/drm_common.c +++ b/video/out/drm_common.c @@ -845,6 +845,9 @@ bool vt_switcher_init(struct vt_switcher *s, struct mp_log *log) vt_mode.mode = VT_PROCESS; vt_mode.relsig = RELEASE_SIGNAL; vt_mode.acqsig = ACQUIRE_SIGNAL; + // frsig is a signal for forced release. Not implemented on Linux, + // Solaris, BSDs but must be set to a valid signal on some of those. + vt_mode.frsig = SIGIO; // unused if (ioctl(s->tty_fd, VT_SETMODE, &vt_mode) < 0) { MP_ERR(s, "VT_SETMODE failed: %s\n", mp_strerror(errno)); return false; -- cgit v1.2.3