fix: only run glxinfo if it is installed

This commit is contained in:
Martin Wimpress 2024-05-11 12:09:51 +01:00 committed by Martin Wimpress
parent eb6e9bf4df
commit ed1e85fb12
1 changed files with 9 additions and 5 deletions

View File

@ -1881,11 +1881,15 @@ if [ -n "${VM}" ] && [ -e "${VM}" ]; then
# 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
if [ -z "${PUBLIC}" ]; then