diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2003-08-01 20:48:32 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2003-08-01 20:48:32 +0000 |
commit | 0b3d57562f0ef60c905e16559f46fe64174a6839 (patch) | |
tree | f0329fcb5a739434572dc577a1bd4a3a75b0b558 /perl-install/Xconfig/xfreeX.pm | |
parent | 77b45e03e0c9a231bcceb551b199162464c25f9f (diff) | |
download | drakx-0b3d57562f0ef60c905e16559f46fe64174a6839.tar drakx-0b3d57562f0ef60c905e16559f46fe64174a6839.tar.gz drakx-0b3d57562f0ef60c905e16559f46fe64174a6839.tar.bz2 drakx-0b3d57562f0ef60c905e16559f46fe64174a6839.tar.xz drakx-0b3d57562f0ef60c905e16559f46fe64174a6839.zip |
=> do as Chris Picton suggested
Chris Picton said (nearly one year ago :-/) :
I have found the need for many low res screen resolutions for such
thingas as movie playing, xmame, etc.
The method XFdrake uses to enable modes is to enumerate each mode in the
XF86Config file. For example (a newly created file):
Subsection "Display"
Depth 24
Modes "1280x960" "1152x864" "1024x768" "800x600" "640x480"
EndSubsection
It would be better (at least under XFree 4, which automatically provides
resoltions from the monitor, if it is capable), to not limit the modes
provided to the user
If I use instead, the following:
Subsection "Display"
Depth 24
Virtual 1280 960
EndSubsection
My maximum mode is exactly the same as before, but I have many more low
resolution modes.
Diffstat (limited to 'perl-install/Xconfig/xfreeX.pm')
-rw-r--r-- | perl-install/Xconfig/xfreeX.pm | 28 |
1 files changed, 2 insertions, 26 deletions
diff --git a/perl-install/Xconfig/xfreeX.pm b/perl-install/Xconfig/xfreeX.pm index deb69823c..b6223a7fa 100644 --- a/perl-install/Xconfig/xfreeX.pm +++ b/perl-install/Xconfig/xfreeX.pm @@ -172,35 +172,11 @@ sub get_resolution { my $depth = val($Screen->{DefaultColorDepth}); my $Display = find { !$depth || val($_->{l}{Depth}) eq $depth } @{$Screen->{Display} || []} or return {}; - val($Display->{l}{Modes}) =~ /(\d+)x(\d+)/ or return {}; + $Display->{l}{Virtual} && val($Display->{l}{Virtual}) =~ /(\d+)\s+(\d+)/ or + val($Display->{l}{Modes}) =~ /(\d+)x(\d+)/ or return {}; { X => $1, Y => $2, Depth => val($Display->{l}{Depth}) }; } -sub set_resolution { - my ($raw_X, $resolution, $o_Screen_) = @_; - - foreach my $Screen ($o_Screen_ ? $o_Screen_ : $raw_X->get_screens) { - $Screen ||= $raw_X->get_default_screen or internal_error('no screen'); - - $Screen->{DefaultColorDepth} = { val => $resolution->{Depth} }; - $Screen->{Display} = [ map { - my $modes = do { - if ($raw_X->is_fbdev($Screen)) { - '"default"'; - } else { - my @Modes = grep { - if_(m/(\d+)x(\d+)/, - $1 <= $resolution->{X} && (!$resolution->{Y} || $2 <= $resolution->{Y})); - } reverse our @resolutions; - join(" ", map { qq("$_") } @Modes); - } - }; - { l => { Depth => { val => $_ }, Modes => { val => $modes } } }; - } $raw_X->depths ]; - } -} - - #-############################################################################## #- common to xfree3 and xfree4 #-############################################################################## |