Tweak DISPLAY_DEVICE based on macOS release
Do not try and coerce the screen resolution on macOS. Resolution is defined via System Preferences only on macOS. qxl is the display device on Catalina and Big Sur and VGA is used on Mahave and High Sierra. bochs-display also appears to work correctly on Big Sur providing the QEMU moniotor is set to none, which Quickemu does by default.
This commit is contained in:
parent
2a344f6fad
commit
e6c7603864
18
quickemu
18
quickemu
|
@ -397,14 +397,25 @@ function vm_boot() {
|
|||
fi
|
||||
fi
|
||||
|
||||
echo " - Screen: ${X_RES}x${Y_RES}"
|
||||
if [ "${guest_os}" != "macos" ]; then
|
||||
echo " - Screen: ${X_RES}x${Y_RES}"
|
||||
fi
|
||||
echo " - Display: ${OUTPUT^^}"
|
||||
|
||||
# https://www.kraxel.org/blog/2019/09/display-devices-in-qemu/
|
||||
if [ "${guest_os}" == "linux" ]; then
|
||||
DISPLAY_DEVICE="virtio-vga"
|
||||
elif [ "${guest_os}" == "macos" ]; then
|
||||
DISPLAY_DEVICE="qxl"
|
||||
# Tweak video device based on the guest macOS release.
|
||||
# Displays in System Preferences can be used to select a resolution if:
|
||||
# - qxl is used on Big Sur and Catalina
|
||||
# - VGA is used on Mojave, although options are limited and they are all 4:3
|
||||
# - High Sierra will run at the default 1920x1080 only.
|
||||
case ${macos_release} in
|
||||
catalina) DISPLAY_DEVICE="qxl";;
|
||||
big-sur) DISPLAY_DEVICE="qxl";;
|
||||
*) DISPLAY_DEVICE="VGA";;
|
||||
esac
|
||||
elif [ "${guest_os}" == "windows" ]; then
|
||||
DISPLAY_DEVICE="qxl-vga"
|
||||
else
|
||||
|
@ -412,9 +423,6 @@ function vm_boot() {
|
|||
fi
|
||||
|
||||
if [ "${OUTPUT}" == "spice" ]; then
|
||||
if [ "${guest_os}" == "linux" ]; then
|
||||
DISPLAY_DEVICE="qxl-vga"
|
||||
fi
|
||||
OUTPUT="none"
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue