summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl-install/mouse.pm15
1 files changed, 15 insertions, 0 deletions
diff --git a/perl-install/mouse.pm b/perl-install/mouse.pm
index 70d891141..3de4cb781 100644
--- a/perl-install/mouse.pm
+++ b/perl-install/mouse.pm
@@ -268,6 +268,7 @@ sub detect() {
}
if (modules::get_probeall("usb-interface")) {
+ sleep 2;
if (my (@l) = detect_devices::usbMice()) {
log::l(join('', "found usb mouse $_->{driver} $_->{description} (", if_($_->{type}, $_->{type}), ")")) foreach @l;
eval { modules::load(qw(hid mousedev usbmouse)) };
@@ -325,6 +326,20 @@ sub detect() {
return fullname2mouse("serial|Generic 2 Button Mouse", unsafe => 1);
}
+sub load_modules {
+ my ($mouse) = @_;
+ my @l;
+ for ($mouse->{type}) {
+ /serial/ and @l = qw(serial);
+ /USB/ and @l = qw(hid mousedev usbmouse);
+ }
+ foreach ($mouse->{wacom}) {
+ /ttyS/ and push @l, qw(serial);
+ /event/ and push @l, qw(wacom evdev);
+ }
+ eval { modules::load(@l) };
+}
+
sub set_xfree_conf {
my ($mouse, $xfree_conf, $b_keep_auxmouse_unchanged) = @_;