From 97ed258da08e51ab9d12f923952f875db5456680 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 25 Sep 2008 14:51:31 +0000 Subject: cleanup: don't modify $default_resolution, use a new var ($resolution) instead (needed for next commit) --- lib/Xconfig/resolution_and_depth.pm | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'lib') diff --git a/lib/Xconfig/resolution_and_depth.pm b/lib/Xconfig/resolution_and_depth.pm index 5b43691..479ceda 100644 --- a/lib/Xconfig/resolution_and_depth.pm +++ b/lib/Xconfig/resolution_and_depth.pm @@ -201,19 +201,20 @@ sub configure { my ($default_resolution, @resolutions) = choices($raw_X, $o_resolution || $raw_X->get_resolution, $card, $monitors); + my $resolution; if ($b_auto) { #- use $default_resolution if ($card->{Driver} eq 'fglrx' && !$default_resolution->{automatic}) { - $default_resolution = first(find { $default_resolution->{Y} eq $_->{Y} && $_->{Depth} == 24 } + $resolution = first(find { $default_resolution->{Y} eq $_->{Y} && $_->{Depth} == 24 } $default_resolution, @resolutions); - $default_resolution ||= first(find { $_->{Depth} == 24 } $default_resolution, @resolutions); + $resolution ||= first(find { $_->{Depth} == 24 } $resolution, @resolutions); } } elsif ($in->isa('interactive::gtk')) { - $default_resolution = choose_gtk($in, $card, $default_resolution, @resolutions) or return; + $resolution = choose_gtk($in, $card, $default_resolution, @resolutions) or return; } else { - $default_resolution = choose($in, $default_resolution, @resolutions) or return; + $resolution = choose($in, $default_resolution, @resolutions) or return; } - set_resolution($raw_X, $default_resolution, @resolutions); + set_resolution($raw_X, $resolution, @resolutions); } sub configure_auto_install { -- cgit v1.2.1