From 94cdce7dd23a4bebb865b21a3f0000466a271b9d Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 13 May 2024 19:40:34 +0100 Subject: [PATCH] fix: check for braille support before enabling it --- quickemu | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/quickemu b/quickemu index 16a8019..d2963c5 100755 --- a/quickemu +++ b/quickemu @@ -1039,11 +1039,15 @@ function vm_boot() { args+=(-k "${keyboard_layout}") fi - # FIXME: Check for device availability. qemu will fail to start otherwise if [ -n "${BRAILLE}" ]; then - # shellcheck disable=SC2054 - args+=(-chardev braille,id=brltty - -device usb-braille,id=usbbrl,chardev=brltty) + if ${QEMU} -chardev help | grep -q braille; then + # shellcheck disable=SC2054 + #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 # setup mouse