summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-08-08 20:16:05 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-08-08 20:16:05 +0000
commit3467af25441cc4cf1510cf925f9916f64d43f50e (patch)
tree5bd9c00a5df7ca3f3aceeb1ec0e4be5d4b938d7a /perl-install
parent5e4482191b73a497dc125b065eea03b26d8335fb (diff)
downloaddrakx-3467af25441cc4cf1510cf925f9916f64d43f50e.tar
drakx-3467af25441cc4cf1510cf925f9916f64d43f50e.tar.gz
drakx-3467af25441cc4cf1510cf925f9916f64d43f50e.tar.bz2
drakx-3467af25441cc4cf1510cf925f9916f64d43f50e.tar.xz
drakx-3467af25441cc4cf1510cf925f9916f64d43f50e.zip
when prompting for VideoRam, default to the value obtained via DDC
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/Xconfig/card.pm6
-rw-r--r--perl-install/Xconfig/main.pm6
-rw-r--r--perl-install/Xconfig/monitor.pm2
3 files changed, 8 insertions, 6 deletions
diff --git a/perl-install/Xconfig/card.pm b/perl-install/Xconfig/card.pm
index f1eed7a0b..9387d9e74 100644
--- a/perl-install/Xconfig/card.pm
+++ b/perl-install/Xconfig/card.pm
@@ -254,8 +254,8 @@ sub configure_auto_install {
$card->{prog} = install_server($card, $options, $do_pkgs);
if ($card->{needVideoRam} && !$card->{VideoRam}) {
- $card->{VideoRam} = 4096;
- log::l("argh, I need to know VideoRam! Taking a default value: VideoRam = $card->{VideoRam}");
+ $card->{VideoRam} = $options->{VideoRam_probed} || 4096;
+ log::l("argh, I need to know VideoRam! Taking " . ($options->{probed_VideoRam} ? "the probed" : "a default") . " value: VideoRam = $card->{VideoRam}");
}
to_raw_X($card, $raw_X);
$card;
@@ -278,7 +278,7 @@ sub configure {
$card->{prog} = install_server($card, $options, $do_pkgs);
$in->ask_from('', _("Select the memory size of your graphics card"),
- [ { val => \ ($card->{VideoRam} = 4096),
+ [ { val => \ ($card->{VideoRam} = $options->{VideoRam_probed} || 4096),
type => 'list',
list => [ ikeys %VideoRams ],
format => sub { translate($VideoRams{$_[0]}) },
diff --git a/perl-install/Xconfig/main.pm b/perl-install/Xconfig/main.pm
index b8a2656b9..10cc58f1c 100644
--- a/perl-install/Xconfig/main.pm
+++ b/perl-install/Xconfig/main.pm
@@ -35,8 +35,9 @@ sub configure_resolution {
sub configure_everything_auto_install {
my ($raw_X, $do_pkgs, $old_X, $options) = @_;
- my $card = Xconfig::card::configure_auto_install($raw_X, $do_pkgs, $old_X, $options) or return;
my $monitor = Xconfig::monitor::configure_auto_install($raw_X, $old_X) or return;
+ $options->{VideoRam_probed} = $monitor->{VideoRam_probed};
+ my $card = Xconfig::card::configure_auto_install($raw_X, $do_pkgs, $old_X, $options) or return;
Xconfig::screen::configure($raw_X, $card) or return;
my $resolution = Xconfig::resolution_and_depth::configure_auto_install($raw_X, $card, $monitor, $old_X);
@@ -51,8 +52,9 @@ sub configure_everything {
my ($in, $raw_X, $do_pkgs, $auto, $options) = @_;
my $X = {};
my $ok = 1;
- $ok &&= $X->{card} = Xconfig::card::configure($in, $raw_X, $do_pkgs, $auto, $options);
$ok &&= $X->{monitor} = Xconfig::monitor::configure($in, $raw_X, $auto);
+ $options->{VideoRam_probed} = $X->{monitor}{VideoRam_probed};
+ $ok &&= $X->{card} = Xconfig::card::configure($in, $raw_X, $do_pkgs, $auto, $options);
$ok &&= Xconfig::screen::configure($raw_X, $X->{card});
$ok &&= $X->{resolution} = Xconfig::resolution_and_depth::configure($in, $raw_X, $X->{card}, $X->{monitor}, $auto);
$ok &&= Xconfig::test::test($in, $raw_X, $X->{card}, $auto);
diff --git a/perl-install/Xconfig/monitor.pm b/perl-install/Xconfig/monitor.pm
index a86b1bf82..d648a2d54 100644
--- a/perl-install/Xconfig/monitor.pm
+++ b/perl-install/Xconfig/monitor.pm
@@ -149,7 +149,7 @@ sub getinfoFromDDC {
my ($h, $v, $size, @m) = @l;
{
- VideoRam => $VideoRam,
+ VideoRam_probed => to_int($VideoRam),
HorizSync => first($h =~ /^(\S*)/),
VertRefresh => first($v =~ /^(\S*)/),
size => to_float($size),