diff options
Diffstat (limited to 'remote/modules/vmware/data/opt')
| -rw-r--r-- | remote/modules/vmware/data/opt/openslx/vmchooser/vmware/includes/parse_vmx.inc | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/remote/modules/vmware/data/opt/openslx/vmchooser/vmware/includes/parse_vmx.inc b/remote/modules/vmware/data/opt/openslx/vmchooser/vmware/includes/parse_vmx.inc index 878e9a9d..69ec513a 100644 --- a/remote/modules/vmware/data/opt/openslx/vmchooser/vmware/includes/parse_vmx.inc +++ b/remote/modules/vmware/data/opt/openslx/vmchooser/vmware/includes/parse_vmx.inc @@ -128,8 +128,26 @@ if [ -n "$SLX_EXAM" ]; then echo 'gui.restricted = "true"' >> "${TMPCONFIG}" fi +# Hack resolution if we know the desired one is not in the default list of vmx_svga +# For now, only do it on the odd ones, as we don't know if this has any side effects +# This seems unnecessary on Win7 but is required on WinXP - need more research for other OSs +case "$RESOLUTION" in + 1600x900|2560x1440|2880x1800|3200x1800) + X=${RESOLUTION%x*} + Y=${RESOLUTION#*x} + BYTES=$(( ( ( X * Y * 4 + 65535 ) / 65536 ) * 65536 )) + [ "$BYTES" -lt 16777216 ] && BYTES=16777216 + cat >> "${TMPCONFIG}" <<-EOF + svga.autodetect = "FALSE" + svga.vramSize = $BYTES + svga.maxWidth = $X + svga.maxHeight = $Y + EOF + ;; +esac + # Killing duplicate lines (output much nicer than sort -u): -awk '!a[$0]++' "${TMPCONFIG}" > "${TMPCONFIG}.tmp" && mv "${TMPCONFIG}.tmp" "${TMPCONFIG}" +awk '!a[$0]++' "${TMPCONFIG}" > "${TMPCONFIG}.tmp" && mv -f "${TMPCONFIG}.tmp" "${TMPCONFIG}" # Apply $maxhardwareversion to final VMX HWVER=$(grep -i -m1 '^virtualHW.version *= *' "${TMPCONFIG}" | awk -F '=' '{print $2}' | sed -r 's/[^0-9]//g') |
