diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2005-10-06 12:06:30 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2005-10-06 12:06:30 +0000 |
commit | 73285b1e3babd3de48549233eb35360605eda473 (patch) | |
tree | eb0f5f08fa3194c51bc33c889c0bf92c5b13a3d0 | |
parent | 3295f10d9c1fb94830c41d0c47361f22b373e1a9 (diff) | |
download | drakx-backup-do-not-use-73285b1e3babd3de48549233eb35360605eda473.tar drakx-backup-do-not-use-73285b1e3babd3de48549233eb35360605eda473.tar.gz drakx-backup-do-not-use-73285b1e3babd3de48549233eb35360605eda473.tar.bz2 drakx-backup-do-not-use-73285b1e3babd3de48549233eb35360605eda473.tar.xz drakx-backup-do-not-use-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
-rw-r--r-- | perl-install/Xconfig/card.pm | 17 |
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'; |