fix(darwin): update display_param_check() to correctly verify displays

This commit is contained in:
Martin Wimpress 2024-05-15 00:59:54 +01:00 committed by Martin Wimpress
parent 6528520d0f
commit 63409682f2
1 changed files with 11 additions and 10 deletions

View File

@ -1558,17 +1558,18 @@ function display_param_check() {
display="sdl"
fi
if [ "${display}" != "gtk" ] && [ "${display}" != "none" ] && [ "${display}" != "sdl" ] && [ "${display}" != "spice" ] && [ "${display}" != "spice-app" ]; then
echo "ERROR! Requested output '${display}' is not recognised."
exit 1
elif [ "${display}" == "cocoa" ] && [ ${DARWIN} -eq 0 ]; then
echo "ERROR! Requested output '${display}' is only supported on macOS."
exit 1
elif [ "${display}" != "cocoa" ] && [ ${DARWIN} -eq 1 ]; then
if [ ${DARWIN} -eq 1 ]; then
if [ "${display}" != "cocoa" ]; then
echo "WARNING! Requested output '${display}' but only 'cocoa' is avalible on macOS."
echo " Setting display to 'cocoa'."
display="cocoa"
fi
else
if [ "${display}" != "gtk" ] && [ "${display}" != "none" ] && [ "${display}" != "sdl" ] && [ "${display}" != "spice" ] && [ "${display}" != "spice-app" ]; then
echo "ERROR! Requested output '${display}' is not recognised."
exit 1
fi
fi
# Set the default 3D acceleration.
if [ -z "${gl}" ]; then