diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2002-11-06 19:36:59 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2002-11-06 19:36:59 +0000 |
commit | 79a34036b86e79ea7f1b4983cce15edaafc932fc (patch) | |
tree | 9d7df3fe97387338c4e96dfa3b2ebedf0eeb6f65 /perl-install/Xconfig/card.pm | |
parent | 12e2b5c87a379eec81c5e2d80b67493689691082 (diff) | |
download | drakx-79a34036b86e79ea7f1b4983cce15edaafc932fc.tar drakx-79a34036b86e79ea7f1b4983cce15edaafc932fc.tar.gz drakx-79a34036b86e79ea7f1b4983cce15edaafc932fc.tar.bz2 drakx-79a34036b86e79ea7f1b4983cce15edaafc932fc.tar.xz drakx-79a34036b86e79ea7f1b4983cce15edaafc932fc.zip |
when needVideoRam, don't take the raw value VideoRam_probed,
better take a known value <= VideoRam_probed
Diffstat (limited to 'perl-install/Xconfig/card.pm')
-rw-r--r-- | perl-install/Xconfig/card.pm | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/perl-install/Xconfig/card.pm b/perl-install/Xconfig/card.pm index e35df200b..5e397e65d 100644 --- a/perl-install/Xconfig/card.pm +++ b/perl-install/Xconfig/card.pm @@ -283,13 +283,15 @@ sub configure { $card->{prog} = install_server($card, $options, $do_pkgs); - $in->ask_from('', N("Select the memory size of your graphics card"), - [ { val => \ ($card->{VideoRam} = $options->{VideoRam_probed} || 4096), - type => 'list', - list => [ ikeys %VideoRams ], - format => sub { translate($VideoRams{$_[0]}) }, - not_edit => !$::expert } ]) or return - if $card->{needVideoRam} && !$card->{VideoRam}; + if ($card->{needVideoRam} && !$card->{VideoRam}) { + $card->{VideoRam} = first(grep { $_ <= $options->{VideoRam_probed} } reverse ikeys %VideoRams) || 4096; + $in->ask_from('', N("Select the memory size of your graphics card"), + [ { val => \$card->{VideoRam}, + type => 'list', + list => [ ikeys %VideoRams ], + format => sub { translate($VideoRams{$_[0]}) }, + not_edit => !$::expert } ]) or return; + } to_raw_X($card, $raw_X); $card; |