1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-25 08:12:17 +00:00

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.
[...]
This commit is contained in:
Jan Beich 2019-09-21 20:54:24 +00:00 committed by Anton Kindestam
parent 427709575d
commit 90737ec77d

View File

@ -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;