From 49cdb4136da1c9ddff4bc4a71ddf43ebf9ad1042 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 15 Sep 2003 22:21:21 +0000 Subject: show the current driver too (being preselected) so that users do not get confused --- perl-install/harddrake/sound.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'perl-install/harddrake') diff --git a/perl-install/harddrake/sound.pm b/perl-install/harddrake/sound.pm index dbade4e7c..0996d9001 100644 --- a/perl-install/harddrake/sound.pm +++ b/perl-install/harddrake/sound.pm @@ -143,6 +143,7 @@ sub get_alternative { sub do_switch { my ($in, $old_driver, $new_driver, $index) = @_; + return if $old_driver eq $new_driver; my $_wait = $in->wait_message(N("Please wait"), N("Please Wait... Applying the configuration")); log::explanations("removing old $old_driver\n"); rooted("service sound stop") unless $blacklisted; @@ -168,7 +169,8 @@ sub switch { foreach (@blacklist) { $blacklisted = 1 if $driver eq $_ } my $alternative = get_alternative($driver); if ($alternative) { - my $new_driver = $alternative->[0]; + my $new_driver = $driver; + push @$alternative, $driver; if ($new_driver eq 'unknown') { $in->ask_from(N("No alternative driver"), N("There's no known OSS/ALSA alternative driver for your sound card (%s) which currently uses \"%s\"", -- cgit v1.2.1