From 1f33c517df4a7b3a9d53b15d602d1d9f59852277 Mon Sep 17 00:00:00 2001 From: stelar7 Date: Sat, 26 Jun 2021 20:49:53 +0200 Subject: [PATCH] Meta: Do not use gl=on if building in WSL --- Meta/run.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Meta/run.sh b/Meta/run.sh index 97cf6a71672..d4d59d86fb6 100755 --- a/Meta/run.sh +++ b/Meta/run.sh @@ -54,7 +54,13 @@ installed_major_version=$("$SERENITY_QEMU_BIN" -version | head -n 1 | sed -E 's/ [ "$installed_major_version" -lt "$SERENITY_QEMU_MIN_REQ_VERSION" ] && die "Required QEMU >= 5.0! Found $($SERENITY_QEMU_BIN -version | head -n 1)" SERENITY_SCREENS="${SERENITY_SCREENS:-1}" -SERENITY_QEMU_DISPLAY_BACKEND="${SERENITY_QEMU_DISPLAY_BACKEND:-sdl,gl=on}" +if uname -a | grep -iq WSL; then + # QEMU for windows does not like gl=on, so detect if we are building in wsl, and if so, disable it + SERENITY_QEMU_DISPLAY_BACKEND="${SERENITY_QEMU_DISPLAY_BACKEND:-sdl,gl=off}" +else + SERENITY_QEMU_DISPLAY_BACKEND="${SERENITY_QEMU_DISPLAY_BACKEND:-sdl,gl=on}" +fi + if [ "$SERENITY_SCREENS" -gt 1 ]; then SERENITY_QEMU_DISPLAY_DEVICE="virtio-vga,max_outputs=$SERENITY_SCREENS " # QEMU appears to always relay absolute mouse coordinates relative to the screen that the mouse is