forked from PortsMaster/PortMaster-GUI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlibgl_Batocera.txt
30 lines (26 loc) · 917 Bytes
/
libgl_Batocera.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
# NOTE: This script uses $PWD to setup the GL4ES directory!
# Before calling this, ensure you are on the port root directory, e.g.:
# > gamedir="/$directory/ports/stardewvalley"
# > cd "$gamedir/"
if ! glxinfo | grep "OpenGL version string"; then
export LIBGL_ES=2
export LIBGL_GL=21
export LIBGL_FB=4
# If the dri device does not exist, then let's not use
# the gbm backend.
if [ ! -e "/dev/dri/card0" ]; then
export LIBGL_FB=2
fi
if [ -d "$PWD/gl4es.$DEVICE_ARCH" ]; then
export LD_LIBRARY_PATH="$PWD/gl4es.$DEVICE_ARCH:$LD_LIBRARY_PATH"
elif [ -d "$PWD/gl4es" ]; then
export LD_LIBRARY_PATH="$PWD/gl4es:$LD_LIBRARY_PATH"
fi
fi
# This sets up the standard libs directory.
if [ -d "$PWD/libs.$DEVICE_ARCH" ]; then
export LD_LIBRARY_PATH="$PWD/libs.$DEVICE_ARCH:$LD_LIBRARY_PATH"
elif [ -d "$PWD/libs" ]; then
export LD_LIBRARY_PATH="$PWD/libs:$LD_LIBRARY_PATH"
fi