fix(quickemu): disable GL when display backend is none

- Disable GL context creation when no display backend is selected by
setting gl="off"
- Keep spice behaviour unchanged (DISPLAY_RENDER remains "none")
- Prevent GL-related errors and unnecessary GPU initialisation for
headless VMs

Signed-off-by: Martin Wimpress <martin@wimpress.org>
This commit is contained in:
Martin Wimpress 2026-01-25 15:07:52 +00:00 committed by Martin Wimpress
parent dead42dc25
commit e600d742ba
1 changed files with 3 additions and 1 deletions

View File

@ -1337,7 +1337,9 @@ function configure_display() {
[ "${gl}" == "on" ] && gl="off"
fi;;
gtk) DISPLAY_RENDER="${display},grab-on-hover=on,zoom-to-fit=off,gl=${gl}";;
none|spice) DISPLAY_RENDER="none";;
none) DISPLAY_RENDER="none"
gl="off";; # No display backend means no GL context
spice) DISPLAY_RENDER="none";;
sdl) DISPLAY_RENDER="${display},gl=${gl}";;
spice-app) DISPLAY_RENDER="${display},gl=${gl}";;
*) DISPLAY_RENDER="${display}";;