summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-04-28 15:51:50 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-04-28 15:51:50 +0000
commit31fdcc7b2b0d02ed84853e4e21c3562f98a3f37a (patch)
tree2891d70d830450c167dc6b399b324748d50f3d09
parent8499bd89d807a03a9f94fe2359818e670a908514 (diff)
downloaddrakx-31fdcc7b2b0d02ed84853e4e21c3562f98a3f37a.tar
drakx-31fdcc7b2b0d02ed84853e4e21c3562f98a3f37a.tar.gz
drakx-31fdcc7b2b0d02ed84853e4e21c3562f98a3f37a.tar.bz2
drakx-31fdcc7b2b0d02ed84853e4e21c3562f98a3f37a.tar.xz
drakx-31fdcc7b2b0d02ed84853e4e21c3562f98a3f37a.zip
if one prefer using "Modes" instead of "Virtual", keep it as is
-rw-r--r--perl-install/Xconfig/xfree.pm7
1 files changed, 5 insertions, 2 deletions
diff --git a/perl-install/Xconfig/xfree.pm b/perl-install/Xconfig/xfree.pm
index b05e25a5e..da6799b6a 100644
--- a/perl-install/Xconfig/xfree.pm
+++ b/perl-install/Xconfig/xfree.pm
@@ -152,10 +152,13 @@ sub set_resolution {
foreach my $Screen ($o_Screen_ ? $o_Screen_ : $raw_X->get_Sections('Screen')) {
$Screen ||= $raw_X->get_default_screen or internal_error('no screen');
+
+ my $Mode_name = (any { $_->{l}{Modes} } @{$Screen->{Display} || []}) ? 'Modes' : 'Virtual';
+ my $Mode = sprintf($Mode_name eq 'Modes' ? '"%dx%d"' : '%d %d', @$resolution{'X', 'Y'});
- $Screen->{DefaultColorDepth} = { val => $resolution->{Depth} eq '32' ? 24 : $resolution->{Depth} };
+ $Screen->{DefaultColorDepth} = { val => $resolution->{Depth} eq '32' ? 24 : $resolution->{Depth} };
$Screen->{Display} = [ map {
- { l => { Depth => { val => $_ }, Virtual => { val => join(' ', @$resolution{'X', 'Y'}) } } };
+ { l => { Depth => { val => $_ }, $Mode_name => { val => $Mode } } };
} 8, 15, 16, 24 ];
}
add_gtf_ModeLines($raw_X, $resolution);