Meta: Add SERENITY_GL environment variable to run.sh

This commit is contained in:
Sahan Fernando 2022-02-18 16:26:27 +11:00 committed by Ali Mohammad Pur
parent 407b67e72a
commit 04849c9561

View file

@ -187,8 +187,14 @@ else
SERENITY_QEMU_DISPLAY_BACKEND="${SERENITY_QEMU_DISPLAY_BACKEND:-gtk,gl=off}"
fi
SERENITY_GL="${SERENITY_GL:-0}"
if [ -z "$SERENITY_QEMU_DISPLAY_DEVICE" ]; then
if [ "$SERENITY_SCREENS" -gt 1 ]; then
if [ "$SERENITY_GL" = "1" ]; then
SERENITY_QEMU_DISPLAY_DEVICE="virtio-vga-gl "
if [ "$SERENITY_SCREENS" -gt 1 ]; then
die "SERENITY_GL and multi-monitor support cannot be setup simultaneously"
fi
elif [ "$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
# pointed to, without any way for us to know what screen it was. So, when dealing with multiple