mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-08-05 17:07:49 +00:00
xbmc: move GPUTYPE detection to init.
This commit is contained in:
parent
83a284fff2
commit
477200956a
@ -36,13 +36,3 @@ for sys in /usr/lib/xbmc/addons/*/lib; do
|
||||
[ -d "$sys" ] && LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$sys"
|
||||
done
|
||||
export LD_LIBRARY_PATH
|
||||
|
||||
# GPUTYPE
|
||||
GPUTYPE="OTHER"
|
||||
if [ -x /usr/bin/lspci ]; then
|
||||
GPUDEVICE=$(lspci -n | grep 0300)
|
||||
[ "$(echo $GPUDEVICE | grep 8086)" ] && GPUTYPE="INTEL" # 8086 == INTEL
|
||||
[ "$(echo $GPUDEVICE | grep 10de)" ] && GPUTYPE="NVIDIA" # 10de == NVIDIA
|
||||
[ "$(echo $GPUDEVICE | grep 1002)" ] && GPUTYPE="AMD" # 1002 == AMD
|
||||
fi
|
||||
export GPUTYPE
|
||||
|
@ -88,6 +88,11 @@ EOF
|
||||
#
|
||||
|
||||
# Always sync to vblank
|
||||
if [ -x /usr/bin/lspci ]; then
|
||||
GPUDEVICE=$(lspci -n | grep 0300)
|
||||
[ "$(echo $GPUDEVICE | grep 10de)" ] && GPUTYPE="NVIDIA" # 10de == NVIDIA
|
||||
[ "$(echo $GPUDEVICE | grep 1002)" ] && GPUTYPE="AMD" # 1002 == AMD
|
||||
fi
|
||||
if [ "$GPUTYPE" = "NVIDIA" -o "$GPUTYPE" = "AMD" ] ; then
|
||||
cat >> $HOME/.xbmc/userdata/guisettings.xml << EOF
|
||||
<videoscreen>
|
||||
|
Loading…
x
Reference in New Issue
Block a user