fix(quickemu): set xres/yres only for devices that support them

- Replace vmware-svga exclusion with explicit device regex
- Apply xres/yres only to virtio-(vga|vga-gl|gpu|gpu-pci|gpu-gl-pci),
qxl, qxl-vga and bochs-display
- Prevent passing unsupported xres/yres params to other display devices,
avoiding incorrect resolution coercion and QEMU warnings

Signed-off-by: Martin Wimpress <martin@wimpress.org>
This commit is contained in:
Martin Wimpress 2026-01-24 20:01:31 +00:00 committed by Martin Wimpress
parent 5dfe6c9cf7
commit 5276ebaafb
1 changed files with 2 additions and 2 deletions

View File

@ -1300,8 +1300,8 @@ function configure_display() {
VIDEO="-device ramfb ${VIDEO}"
fi
# Try and coerce the display resolution for Linux guests only.
if [ "${DISPLAY_DEVICE}" != "vmware-svga" ]; then
# Set display resolution for devices that support xres/yres parameters
if [[ "${DISPLAY_DEVICE}" =~ ^(virtio-(vga|vga-gl|gpu|gpu-gl|gpu-pci|gpu-gl-pci)|qxl|qxl-vga|bochs-display)(,|$) ]]; then
VIDEO="${VIDEO},xres=${X_RES},yres=${Y_RES}"
echo " @ (${X_RES} x ${Y_RES})"
else