From f723ce61969a4902c6c22f18de59f7e774045da3 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 13 May 2024 17:39:35 +0100 Subject: [PATCH] refactor: add braille and gl checking to display_param_check() --- quickemu | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/quickemu b/quickemu index ad63e9d..a4b03a0 100755 --- a/quickemu +++ b/quickemu @@ -1422,6 +1422,24 @@ function display_param_check() { echo "ERROR! Requested output '${display}' is not recognised." exit 1 fi + + # Braille support requires SDL. Override $display if braille was requested. + if [ -n "${BRAILLE}" ]; then + display="sdl" + fi + + # Set the default 3D acceleration. + if [ -z "${gl}" ]; then + if command -v glxinfo &>/dev/null; then + GLSL_VER=$(glxinfo | grep "OpenGL ES GLSL" | awk '{print $NF}') + case ${GLSL_VER} in + 1*|2*) gl="off";; + *) gl="on";; + esac + else + gl="on" + fi + fi } function sound_card_param_check() {