aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/freondemo/files/freondemo
blob: bd8a3b609f352ca16c497401b39cbac508411b77 (plain)
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
31
32
#!/bin/sh

# We start a system wide gstd daemon
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 ! 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 &