aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/freondemo/files/freondemo
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/freondemo/files/freondemo')
-rwxr-xr-x[-rw-r--r--]recipes/freondemo/files/freondemo34
1 files changed, 23 insertions, 11 deletions
diff --git a/recipes/freondemo/files/freondemo b/recipes/freondemo/files/freondemo
index 80dd36e132..bd8a3b609f 100644..100755
--- a/recipes/freondemo/files/freondemo
+++ b/recipes/freondemo/files/freondemo
@@ -1,20 +1,32 @@
#!/bin/sh
# We start a system wide gstd daemon
-gstd &
-
-amixer -q sset 'HP DAC' 127
+if ! pidof gstd > /dev/null; then
+ { gstd 2>&1 | logger -t GSTD & } ;
+fi
+
+
+amixer -q sset 'HP DAC' 127
+amixer -q sset 'Line DAC' 127
#If we detect a mouse, use it, otherwise configure the touchcreen
-if [ ! -c /dev/input/mice ] && [ ! -c /dev/input/mouse0 ] ; then
- if [ -c /dev/input/touchscreen0 ] ; then
- export TSLIB_TSDEVICE=/dev/input/touchscreen0
- if [ ! -f /etc/pointercal ] ; then
- # We need to calibrate the screen
- ts_calibrate
- fi
- export QWS_MOUSE_PROTO=tslib
+if ! grep -q mouse1 /proc/bus/input/devices ; then
+ if grep -q Touchscreen /proc/bus/input/devices && [ -c /dev/input/touchscreen0 ] ; then
+ export TSLIB_TSDEVICE=/dev/input/touchscreen0
+ if [ ! -f /etc/pointercal ] ; then
+ # We need to calibrate the screen
+ ts_calibrate
+ fi
+ echo -e "\nFreonDemo using touchscreen"
+ export QWS_MOUSE_PROTO=tslib:/dev/input/touchscreen0
+ else
+ echo "ERROR, no mouse or touchscreen detected for FreonDemo"
+ exit 1;
fi
+else
+ echo -e "\nFreonDemo using mouse input"
+ export QWS_MOUSE_PROTO=MouseMan:/dev/input/mouse1
fi
+#Otherwise try to use the touchscren
/usr/libexec/FreonDemo -qws &