fix: check for braille support before enabling it

This commit is contained in:
Martin Wimpress 2024-05-13 19:40:34 +01:00 committed by Martin Wimpress
parent 980fb1f66a
commit 94cdce7dd2
1 changed files with 8 additions and 4 deletions

View File

@ -1039,11 +1039,15 @@ function vm_boot() {
args+=(-k "${keyboard_layout}") args+=(-k "${keyboard_layout}")
fi fi
# FIXME: Check for device availability. qemu will fail to start otherwise
if [ -n "${BRAILLE}" ]; then if [ -n "${BRAILLE}" ]; then
# shellcheck disable=SC2054 if ${QEMU} -chardev help | grep -q braille; then
args+=(-chardev braille,id=brltty # shellcheck disable=SC2054
-device usb-braille,id=usbbrl,chardev=brltty) #args+=(-chardev braille,id=brltty
# -device usb-braille,id=usbbrl,chardev=brltty)
args+=(-usbdevice braille)
else
echo " - WARNING! ${QEMU} does not support -chardev braille "
fi
fi fi
# setup mouse # setup mouse