summaryrefslogtreecommitdiffstats
path: root/perl-install/detect_devices.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/detect_devices.pm')
-rw-r--r--perl-install/detect_devices.pm9
1 files changed, 7 insertions, 2 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index 76e6e2a24..83011ddc6 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -568,8 +568,13 @@ sub getInputDevices() {
if (!$> && ! -f "/dev/input/$event") {
devices::make("/dev/input/$event");
}
- my @KEYS = c::EVIocGBitKey("/dev/input/$event");
- $device->{SIDE} = 1 if $KEYS[0] & (1 << 0x13);
+ if (-r "/dev/input/$event") {
+ my @KEYS = c::EVIocGBitKey("/dev/input/$event");
+ $device->{SIDE} = 1 if $KEYS[0] & (1 << 0x13);
+ } else {
+ my $KEY = hex($1);
+ $device->{SIDE} = 1 if $KEY & (1 << 0x13);
+ }
} elsif (/^\s*$/) {
push @devices, $device if $device;