From 7bb9e9eced42a011f4aa3e74c7c5f1ff579d2081 Mon Sep 17 00:00:00 2001 From: Denis 'GNUtoo' Carikli Date: Wed, 22 Jul 2020 20:02:33 +0200 Subject: graphics: fix user interface The graphics user interface is the following, according to the help: Usage: graphics.sh [faster|compatible] Examples: graphics.sh faster |-> Uses Android's libagl which is faster but some applications like icecat won't work graphics.sh compatible |-> Uses llvmpipe which is slower but more compatible However the code is still expecting the "libagl" or "llvmpipe" arguments: graphics() { new_renderer="$1" # libagl || llvmpipe [...] if [ "${old_renderer}" == "${new_renderer}" ] ; then [...] } This fix the code to by passing the libagl and llvmpipe arguments to the graphics function as it expects, while keeping the same user interface. Signed-off-by: Denis 'GNUtoo' Carikli --- display/renderer/device-files/graphics.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'display') diff --git a/display/renderer/device-files/graphics.sh b/display/renderer/device-files/graphics.sh index daf4ee1..1dd4462 100644 --- a/display/renderer/device-files/graphics.sh +++ b/display/renderer/device-files/graphics.sh @@ -130,8 +130,10 @@ if [ $# -ne 1 ] ; then usage fi -if [ "$1" = "faster" -o "$1" = "compatible" ] ;then - graphics "$1" +if [ "$1" = "faster" ] ; then + graphics libagl +elif [ "$1" = "compatible" ] ;then + graphics llvmpipe else usage fi -- cgit v1.2.3