Skip to content

Commit

Permalink
refactor: simplify setting the default display resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
flexiondotorg authored and philclifford committed May 13, 2024
1 parent 9b3d89b commit 1819bbb
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions quickemu
Original file line number Diff line number Diff line change
Expand Up @@ -727,14 +727,12 @@ function vm_boot() {
esac

# Determine a sane resolution for Linux guests.
#if [ "${guest_os}" == "linux" ]; then
local X_RES="1280"
local Y_RES="800"
if [ -n "${width}" ] && [ -n "${height}" ]; then
local X_RES="${width}"
local Y_RES="${height}"
fi
#fi
local X_RES="1280"
local Y_RES="800"
if [ -n "${width}" ] && [ -n "${height}" ]; then
local X_RES="${width}"
local Y_RES="${height}"
fi

# https://www.kraxel.org/blog/2019/09/display-devices-in-qemu/
if [ "${guest_os}" == "linux_old" ]; then
Expand Down Expand Up @@ -786,7 +784,7 @@ function vm_boot() {
VIDEO="-device ${DISPLAY_DEVICE}"

# Try and coerce the display resolution for Linux guests only.
if [ "${guest_os}" == "linux" ]; then
if [ "${DISPLAY_DEVICE}" != "vmware-svga" ]; then
VIDEO="${VIDEO},xres=${X_RES},yres=${Y_RES}"
echo " @ (${X_RES} x ${Y_RES})"
else
Expand Down

0 comments on commit 1819bbb

Please sign in to comment.