summaryrefslogtreecommitdiffstats
path: root/perl-install/Xconfig
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-05-13 10:17:16 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-05-13 10:17:16 +0000
commit58a2251adfc2a7c187ed483678c6a024ac64c0af (patch)
tree1e86c583b5e04f66097e306dc189fc4044f87e46 /perl-install/Xconfig
parent3899fa510e8a3a639edcd0e151a34032c115be50 (diff)
downloaddrakx-backup-do-not-use-58a2251adfc2a7c187ed483678c6a024ac64c0af.tar
drakx-backup-do-not-use-58a2251adfc2a7c187ed483678c6a024ac64c0af.tar.gz
drakx-backup-do-not-use-58a2251adfc2a7c187ed483678c6a024ac64c0af.tar.bz2
drakx-backup-do-not-use-58a2251adfc2a7c187ed483678c6a024ac64c0af.tar.xz
drakx-backup-do-not-use-58a2251adfc2a7c187ed483678c6a024ac64c0af.zip
simplify Xconfig::resolution_and_depth::allowed(): adapt it to the way it's really used
Diffstat (limited to 'perl-install/Xconfig')
-rw-r--r--perl-install/Xconfig/resolution_and_depth.pm27
1 files changed, 14 insertions, 13 deletions
diff --git a/perl-install/Xconfig/resolution_and_depth.pm b/perl-install/Xconfig/resolution_and_depth.pm
index 3179aab19..e01ac7ea7 100644
--- a/perl-install/Xconfig/resolution_and_depth.pm
+++ b/perl-install/Xconfig/resolution_and_depth.pm
@@ -81,24 +81,25 @@ sub to_string {
sub allowed {
my ($card) = @_;
- my ($prefered_depth, @depths, @resolutions, @resolution_and_depth);
+ my ($prefered_depth, @resolution_and_depth);
if ($card->{Driver} eq 'fbdev') {
- push @resolution_and_depth, grep { $_->{Depth} == 16 } @bios_vga_modes;
- } elsif ($card->{Driver} eq 'vmware') {
- push @depths, 16, 8;
- } elsif ($card->{Driver} eq 'fglrx') {
- push @depths, 24;
+ @resolution_and_depth = grep { $_->{Depth} == 16 } @bios_vga_modes;
} else {
- if ($card->{use_DRI_GLX}) {
+ my @depths;
+ if ($card->{Driver} eq 'vmware') {
+ @depths = (16, 8);
+ } elsif ($card->{Driver} eq 'fglrx') {
+ @depths = 24;
+ } elsif ($card->{BoardName} eq 'RIVA128') {
+ @depths = qw(8 15 24);
+ } elsif ($card->{use_DRI_GLX}) {
$prefered_depth = 16;
- push @depths, 16, 24;
+ @depths = (16, 24);
+ } else {
+ @depths = our @depths_available;
}
- if ($card->{BoardName} eq 'RIVA128') { @depths = qw(8 15 24) } #- X doesn't even start in 16bpp for RIVA128
- }
- if (!@resolution_and_depth || @depths || @resolutions) {
- @depths = our @depths_available if !@depths;
- @resolutions = @Xconfig::xfree::resolutions if !@resolutions;
+ my @resolutions = @Xconfig::xfree::resolutions;
push @resolution_and_depth,
map {