diff options
author | Jan Beich <jbeich@FreeBSD.org> | 2019-09-21 20:54:24 +0000 |
---|---|---|
committer | Anton Kindestam <antonki@kth.se> | 2020-04-22 11:27:18 +0200 |
commit | 90737ec77d71ff9adbb953ac47f3d6b797bddf54 (patch) | |
tree | 37522bcb729fa5a729664f58182a752f34981e36 /video/out/drm_common.c | |
parent | 427709575d0a1f62401f1d990bdec076a8f82ca5 (diff) | |
download | mpv-90737ec77d71ff9adbb953ac47f3d6b797bddf54.tar.bz2 mpv-90737ec77d71ff9adbb953ac47f3d6b797bddf54.tar.xz |
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.
[...]
Diffstat (limited to 'video/out/drm_common.c')
-rw-r--r-- | video/out/drm_common.c | 3 |
1 files changed, 3 insertions, 0 deletions
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; |