summaryrefslogtreecommitdiffstats
path: root/perl-install/mouse.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/mouse.pm')
-rw-r--r--perl-install/mouse.pm9
1 files changed, 3 insertions, 6 deletions
diff --git a/perl-install/mouse.pm b/perl-install/mouse.pm
index 62617feb7..ab1d1ac42 100644
--- a/perl-install/mouse.pm
+++ b/perl-install/mouse.pm
@@ -287,16 +287,13 @@ sub detect() {
};
if (modules::get_probeall("usb-interface")) {
- my $keep_mouse;
if (my (@l) = detect_devices::usbWacom()) {
log::l("found usb wacom $_->{driver} $_->{description} ($_->{type})") foreach @l;
eval { modules::load("wacom", "evdev") };
- unless ($@) {
- foreach (0..$#l) {
- detect_devices::tryOpen("input/event$_") and $keep_mouse = 1, push @wacom, "input/event$_";
- }
+ if (!$@) {
+ @wacom = grep { detect_devices::tryOpen($_) } map_index { "input/event$::i" } @l;
}
- $keep_mouse or eval { modules::unload("evdev", "wacom") };
+ @wacom or eval { modules::unload("evdev", "wacom") };
}
} else {
log::l("no usb interface found for wacom");