From b5989b75d7a21e2eb2cdfadc2199489e286f25eb Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 15 Sep 2003 22:30:09 +0000 Subject: fix #5488: do not overwrite current driver if it's a viable driver for the current sound card --- perl-install/harddrake/sound.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'perl-install/harddrake/sound.pm') diff --git a/perl-install/harddrake/sound.pm b/perl-install/harddrake/sound.pm index 0996d9001..acef35303 100644 --- a/perl-install/harddrake/sound.pm +++ b/perl-install/harddrake/sound.pm @@ -294,8 +294,11 @@ The current driver for your \"%s\" sound card is \"%s\" ", $device->{description sub configure_sound_slots() { my $altered = 0; each_index { - $altered ||= modules::get_alias("sound-slot-$::i") ne $_->{driver}; - modules::add_alias("sound-slot-$::i", $_->{driver}); + my $default_driver = modules::get_alias("sound-slot-$::i"); + if (!member($default_driver, @{get_alternative($_->{driver})}, $_->{driver})) { + $altered ||= $default_driver ; + modules::add_alias("sound-slot-$::i", $_->{driver}); + } } detect_devices::getSoundDevices(); modules::write_conf() if $altered && $::isStandalone; } -- cgit v1.2.1