Only try to coerce the screen resolution of Linux guests

This feature was originally developed for Linux guests. macOS doesn't honur it and not Windows automatically installs all the required drivers it is not required for Windows either.
This commit is contained in:
Martin Wimpress 2021-10-15 02:44:41 +01:00
parent cc9e13ec81
commit cc397fc088
No known key found for this signature in database
GPG Key ID: 61DF940515E06DA3

View File

@ -488,6 +488,8 @@ function vm_boot() {
fi fi
fi fi
# Determine a sane resolution for Linux guests.
if [ "${guest}" == "linux" ]; then
local X_RES=1152 local X_RES=1152
local Y_RES=648 local Y_RES=648
if [ "${XDG_SESSION_TYPE}" == "x11" ]; then if [ "${XDG_SESSION_TYPE}" == "x11" ]; then
@ -519,9 +521,6 @@ function vm_boot() {
Y_RES=648 Y_RES=648
fi fi
fi fi
if [ "${guest_os}" != "macos" ]; then
echo " - Screen: ${X_RES}x${Y_RES}"
fi fi
# https://www.kraxel.org/blog/2019/09/display-devices-in-qemu/ # https://www.kraxel.org/blog/2019/09/display-devices-in-qemu/
@ -555,8 +554,8 @@ function vm_boot() {
# Build the video configuration # Build the video configuration
VIDEO="-device ${DISPLAY_DEVICE}" VIDEO="-device ${DISPLAY_DEVICE}"
# Do not try and coerce the display resolution for macOS # Try and coerce the display resolution for Linux guests only.
if [ "${guest_os}" != "macos" ]; then if [ "${guest_os}" == "linux" ]; then
VIDEO="${VIDEO},xres=${X_RES},yres=${Y_RES}" VIDEO="${VIDEO},xres=${X_RES},yres=${Y_RES}"
fi fi