From 477200956ae413839e6bfa01855c5139473b600e Mon Sep 17 00:00:00 2001 From: Stefan Saraev Date: Thu, 17 Oct 2013 21:13:48 +0300 Subject: [PATCH] xbmc: move GPUTYPE detection to init. --- packages/mediacenter/xbmc/profile.d/02-xbmc.conf | 10 ---------- packages/mediacenter/xbmc/scripts/xbmc-sources | 5 +++++ 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/packages/mediacenter/xbmc/profile.d/02-xbmc.conf b/packages/mediacenter/xbmc/profile.d/02-xbmc.conf index 0aca956eb1..7cc843c7fe 100644 --- a/packages/mediacenter/xbmc/profile.d/02-xbmc.conf +++ b/packages/mediacenter/xbmc/profile.d/02-xbmc.conf @@ -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 diff --git a/packages/mediacenter/xbmc/scripts/xbmc-sources b/packages/mediacenter/xbmc/scripts/xbmc-sources index 513496dd25..eccea1e62d 100755 --- a/packages/mediacenter/xbmc/scripts/xbmc-sources +++ b/packages/mediacenter/xbmc/scripts/xbmc-sources @@ -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