From 16e8115e7749ee99fd59b480c6ebdbc0f5dbc001 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Fri, 10 May 2024 01:45:52 +0100 Subject: [PATCH] fix(quickemu): detect GLSL version and enable GL accordingly. close #920 --- debian/control | 1 + devshell.nix | 2 ++ package.nix | 2 ++ quickemu | 6 +++++- 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/debian/control b/debian/control index d409b989a9..c73e1432b1 100644 --- a/debian/control +++ b/debian/control @@ -17,6 +17,7 @@ Depends: curl, genisoimage, jq, + mesa-utils, pciutils procps, python3-minimal, diff --git a/devshell.nix b/devshell.nix index b455a4e1e0..5b7b91187a 100644 --- a/devshell.nix +++ b/devshell.nix @@ -3,6 +3,7 @@ cdrtools, curl, git, + glxinfo gnugrep, gnused, jq, @@ -29,6 +30,7 @@ mkShell { cdrtools curl git + glxinfo gnugrep gnused jq diff --git a/package.nix b/package.nix index 742ab1efb3..32963d8f0d 100644 --- a/package.nix +++ b/package.nix @@ -6,6 +6,7 @@ , testers , cdrtools , curl +, glxinfo , gnugrep , gnused , jq @@ -30,6 +31,7 @@ let runtimePaths = [ cdrtools curl + glxinfo gnugrep gnused jq diff --git a/quickemu b/quickemu index 39009f33bb..b229d38f12 100755 --- a/quickemu +++ b/quickemu @@ -1872,7 +1872,11 @@ if [ -n "${VM}" ] && [ -e "${VM}" ]; then # Set the default 3D acceleration. if [ -z "${gl}" ]; then - gl="on" + GLSL_VER=$(glxinfo | grep "OpenGL ES GLSL" | awk '{print $NF}') + case ${GLSL_VER} in + 1*|2*) gl="off";; + *) gl="on";; + esac fi if [ -z "${PUBLIC}" ]; then