Ignore:
Timestamp:
Mar 9, 2022, 5:44:06 PM (3 years ago)
Author:
Sanahuja Guillaume
Message:

change default usb method for ds3, now input event, no need to be root

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/Controller/DualShock3/resources/core2-64/dualshock3.sh

    r306 r467  
    11#! /bin/bash
    2 #ARCH_DIR=$(uname -m)
    32ARCH_DIR=core2-64
    43#on kernel >=4.13, ds3 is seen as a mouse
     
    65for id in `xinput --list|grep 'Sony PLAYSTATION(R)3 Controller'|perl -ne 'while (m/id=(\d+)/g){print "$1\n";}'`; do
    76    xinput set-prop $id 'Device Enabled' 0
    8 done
    9 
    10 #This script is the only one that calls itself with sudo.
    11 #As a consequence, only one exception is needed in sudoers (the following 2 lines)
    12 #  Defaults!/opt/flair/flair-bin/tools/scripts/dualshock3.sh setenv
    13 #  uav ALL=(root) /opt/flair/flair-bin/tools/scripts/dualshock3.sh
    14 
    15 #we must run as root
    16 if [ $EUID -ne 0 ]; then
    17   exec sudo -E $0 $*
    18 fi
     7done
    198
    209. ${FLAIR_ROOT}/flair-src/scripts/ubuntu_cgroup_hack.sh
    2110
    22 export LD_LIBRARY_PATH="${OECORE_HOST_SYSROOT}/usr/lib:${OECORE_HOST_SYSROOT}/lib"
    2311${FLAIR_ROOT}/flair-install/bin/tools/$ARCH_DIR/dualshock3 $*
Note: See TracChangeset for help on using the changeset viewer.