summaryrefslogtreecommitdiffstats
path: root/perl-install/mouse.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-12-16 18:25:37 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-12-16 18:25:37 +0000
commitc3822da244887ef19b2ef7bba5812d18bc6ea8db (patch)
tree4e5d35b87f2a0bacc83a8a76fea755305c7b817e /perl-install/mouse.pm
parent3bf40616e233d127ecc0c1f90edd740d23a361ca (diff)
downloaddrakx-backup-do-not-use-c3822da244887ef19b2ef7bba5812d18bc6ea8db.tar
drakx-backup-do-not-use-c3822da244887ef19b2ef7bba5812d18bc6ea8db.tar.gz
drakx-backup-do-not-use-c3822da244887ef19b2ef7bba5812d18bc6ea8db.tar.bz2
drakx-backup-do-not-use-c3822da244887ef19b2ef7bba5812d18bc6ea8db.tar.xz
drakx-backup-do-not-use-c3822da244887ef19b2ef7bba5812d18bc6ea8db.zip
use ldetect-lst for usb => now auto detects mice types :)
Diffstat (limited to 'perl-install/mouse.pm')
-rw-r--r--perl-install/mouse.pm22
1 files changed, 13 insertions, 9 deletions
diff --git a/perl-install/mouse.pm b/perl-install/mouse.pm
index 2bc5d5efa..7d0cb80c4 100644
--- a/perl-install/mouse.pm
+++ b/perl-install/mouse.pm
@@ -215,15 +215,19 @@ sub detect() {
detect_devices::hasMousePS2("psaux") and return fullname2mouse("PS/2|Standard", unsafe => 1), $wacom;
}
- if (modules::get_alias("usb-interface") && detect_devices::hasUsbMouse()) {
- eval {
- modules::load("usbmouse");
- modules::load("mousedev");
- };
- !$@ && detect_devices::tryOpen("usbmouse") and return fullname2mouse("USB|Generic"), $wacom;
- eval {
- modules::unload("mousedev");
- modules::unload("usbmouse");
+ if (modules::get_alias("usb-interface")) {
+ if (my (@l) = detect_devices::usbMice()) {
+ log::l("found usb mouse $_->{driver} $_->{description} ($_->{type})") foreach @l;
+ eval {
+ modules::load("usbmouse");
+ modules::load("mousedev");
+ };
+ !$@ && detect_devices::tryOpen("usbmouse") and
+ return fullname2mouse($l[0]{driver} =~ /Mouse:(.*)/ ? $1 : "USB|Generic"), $wacom;
+ eval {
+ modules::unload("mousedev");
+ modules::unload("usbmouse");
+ }
}
}