summaryrefslogtreecommitdiffstats
path: root/perl-install/Xconfig/card.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2005-10-06 12:06:30 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2005-10-06 12:06:30 +0000
commit73285b1e3babd3de48549233eb35360605eda473 (patch)
treeeb0f5f08fa3194c51bc33c889c0bf92c5b13a3d0 /perl-install/Xconfig/card.pm
parent3295f10d9c1fb94830c41d0c47361f22b373e1a9 (diff)
downloaddrakx-73285b1e3babd3de48549233eb35360605eda473.tar
drakx-73285b1e3babd3de48549233eb35360605eda473.tar.gz
drakx-73285b1e3babd3de48549233eb35360605eda473.tar.bz2
drakx-73285b1e3babd3de48549233eb35360605eda473.tar.xz
drakx-73285b1e3babd3de48549233eb35360605eda473.zip
(to_raw_X) make it more readable and ensure only one glx is loaded:
- factorize test - set_load_module with test on DRI_GLX_SPECIAL doesn't work when DRI_GLX_SPECIAL isn't set o remove vendor's glx when DRI_GLX_SPECIAL is not set
Diffstat (limited to 'perl-install/Xconfig/card.pm')
-rw-r--r--perl-install/Xconfig/card.pm17
1 files changed, 11 insertions, 6 deletions
diff --git a/perl-install/Xconfig/card.pm b/perl-install/Xconfig/card.pm
index 8bfd09158..0dfc78e87 100644
--- a/perl-install/Xconfig/card.pm
+++ b/perl-install/Xconfig/card.pm
@@ -63,14 +63,19 @@ sub to_raw_X {
$raw_X->get_ServerLayout->{Xinerama} = { commented => !$card->{Xinerama}, Option => 1 }
if defined $card->{Xinerama};
- $raw_X->set_load_module('glx', !$card->{DRI_GLX_SPECIAL} && $card->{Driver} ne 'fbdev'); #- glx for everyone, except proprietary nvidia and fbdev
+ # handle Xorg <-> nvidia swithch when packages're installed:
$raw_X->remove_load_module($card->{REMOVE_GLX}) if $card->{REMOVE_GLX};
- $raw_X->set_load_module('dri', $card->{use_DRI_GLX} && !$card->{DRI_GLX_SPECIAL});
+ if ($card->{DRI_GLX_SPECIAL}) {
+ $raw_X->remove_load_module('glx'); # this doesn't duplicate the above glx line
+ # This loads the NVIDIA GLX extension module.
+ # IT IS IMPORTANT TO KEEP NAME AS FULL PATH TO libglx.so ELSE
+ # IT WILL LOAD XFree86 glx module and the server will crash.
+ $raw_X->add_load_module($card->{DRI_GLX_SPECIAL});
+ } else {
+ $raw_X->set_load_module('glx', $card->{Driver} ne 'fbdev'); #- glx for everyone, except proprietary nvidia and fbdev
+ $raw_X->set_load_module('dri', $card->{use_DRI_GLX});
+ }
- # This loads the NVIDIA GLX extension module.
- # IT IS IMPORTANT TO KEEP NAME AS FULL PATH TO libglx.so ELSE
- # IT WILL LOAD XFree86 glx module and the server will crash.
- $raw_X->set_load_module($card->{DRI_GLX_SPECIAL}, to_bool($card->{DRI_GLX_SPECIAL}));
$raw_X->remove_Section('DRI');
$raw_X->remove_load_module('v4l') if $card->{use_DRI_GLX} && $card->{Driver} eq 'r128';