summaryrefslogtreecommitdiffstats
path: root/perl-install/Xconfig
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-11-06 19:36:59 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-11-06 19:36:59 +0000
commit79a34036b86e79ea7f1b4983cce15edaafc932fc (patch)
tree9d7df3fe97387338c4e96dfa3b2ebedf0eeb6f65 /perl-install/Xconfig
parent12e2b5c87a379eec81c5e2d80b67493689691082 (diff)
downloaddrakx-backup-do-not-use-79a34036b86e79ea7f1b4983cce15edaafc932fc.tar
drakx-backup-do-not-use-79a34036b86e79ea7f1b4983cce15edaafc932fc.tar.gz
drakx-backup-do-not-use-79a34036b86e79ea7f1b4983cce15edaafc932fc.tar.bz2
drakx-backup-do-not-use-79a34036b86e79ea7f1b4983cce15edaafc932fc.tar.xz
drakx-backup-do-not-use-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')
-rw-r--r--perl-install/Xconfig/card.pm16
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;