xbmc: move GPUTYPE detection to init.

This commit is contained in:
Stefan Saraev 2013-10-17 21:13:48 +03:00
parent 83a284fff2
commit 477200956a
2 changed files with 5 additions and 10 deletions

View File

@ -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

View File

@ -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>