summaryrefslogtreecommitdiffstats
path: root/perl-install/Xconfigurator.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2001-06-11 14:04:26 +0000
committerFrancois Pons <fpons@mandriva.com>2001-06-11 14:04:26 +0000
commitb3a2e537105c4d153d2f4ca32fd1e28589c2079c (patch)
tree336c6f2162f561b4efb217fd8ff9e732f82c737c /perl-install/Xconfigurator.pm
parent62f656b5b9f00c1df2aa69856b120ce1cf3fce7c (diff)
downloaddrakx-backup-do-not-use-b3a2e537105c4d153d2f4ca32fd1e28589c2079c.tar
drakx-backup-do-not-use-b3a2e537105c4d153d2f4ca32fd1e28589c2079c.tar.gz
drakx-backup-do-not-use-b3a2e537105c4d153d2f4ca32fd1e28589c2079c.tar.bz2
drakx-backup-do-not-use-b3a2e537105c4d153d2f4ca32fd1e28589c2079c.tar.xz
drakx-backup-do-not-use-b3a2e537105c4d153d2f4ca32fd1e28589c2079c.zip
added magic probe of resolution found, if the probed resolution seems strange
according to memory available, it try to let the user select the right resolution and depth.
Diffstat (limited to 'perl-install/Xconfigurator.pm')
-rw-r--r--perl-install/Xconfigurator.pm10
1 files changed, 8 insertions, 2 deletions
diff --git a/perl-install/Xconfigurator.pm b/perl-install/Xconfigurator.pm
index 1676fcc04..64abd991d 100644
--- a/perl-install/Xconfigurator.pm
+++ b/perl-install/Xconfigurator.pm
@@ -133,7 +133,7 @@ sub readMonitorsDB {
sub keepOnlyLegalModes {
my ($card, $monitor) = @_;
- my $mem = 1024 * ($card->{memory} || ($card->{server} eq 'FBDev' ? 2048 : 99999));
+ my $mem = 1024 * ($card->{memory} || ($card->{server} eq 'FBDev' ? 2048 : 32768)); #- limit to 2048x1536x64
my $hsync = max(split(/[,-]/, $monitor->{hsyncrange}));
while (my ($depth, $res) = each %{$card->{depth}}) {
@@ -836,7 +836,13 @@ sub resolutionsConfiguration {
$auto or ($depth, $wres) = chooseResolutions($card, $depth, $wres) or return;
- unless ($wres) {
+ #- if nothing has been found for wres,
+ #- try to find if memory used by mode found match the memory available
+ #- card, if this is the case for a relatively low resolution ( < 1024 ),
+ #- there could be a problem.
+ #- memory in KB is approximated by $wres*$dpeth/14 which is little less
+ #- than memory really used, (correct factor is 13.65333 for w/h ratio of 1.33333).
+ if (!$wres || $auto && ($wres < 1024 && ($card->{memory} / ($wres * $depth / 14)) > 2)) {
delete $card->{depth};
return resolutionsConfiguration($o);
}