diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-09-25 14:51:31 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-09-25 14:51:31 +0000 |
commit | 97ed258da08e51ab9d12f923952f875db5456680 (patch) | |
tree | 8a91a452b0da796a3b127e249acf290ea5f200d8 | |
parent | 4ee2149bc75d82352deb4902eb88a37b184bcecb (diff) | |
download | drakx-kbd-mouse-x11-97ed258da08e51ab9d12f923952f875db5456680.tar drakx-kbd-mouse-x11-97ed258da08e51ab9d12f923952f875db5456680.tar.gz drakx-kbd-mouse-x11-97ed258da08e51ab9d12f923952f875db5456680.tar.bz2 drakx-kbd-mouse-x11-97ed258da08e51ab9d12f923952f875db5456680.tar.xz drakx-kbd-mouse-x11-97ed258da08e51ab9d12f923952f875db5456680.zip |
cleanup: don't modify $default_resolution, use a new var ($resolution) instead
(needed for next commit)
-rw-r--r-- | lib/Xconfig/resolution_and_depth.pm | 11 |
1 files changed, 6 insertions, 5 deletions
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 { |