summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Xconfig/card.pm2
-rw-r--r--lib/Xconfig/proprietary.pm13
2 files changed, 15 insertions, 0 deletions
diff --git a/lib/Xconfig/card.pm b/lib/Xconfig/card.pm
index c65c641..5ad3179 100644
--- a/lib/Xconfig/card.pm
+++ b/lib/Xconfig/card.pm
@@ -294,6 +294,7 @@ sub install_server {
if ($card->{Driver2}) {
require Xconfig::proprietary;
+ Xconfig::proprietary::handle_DRIVER2_NO_SSE($card);
my @pkgs = Xconfig::proprietary::pkgs_for_Driver2($card->{Driver2}, $do_pkgs);
if (@pkgs && (!$o_in || $o_in->ask_yesorno('', formatAlaTeX(N("There is a proprietary driver available for your video card which may support additional features.
Do you wish to use it?")), 1))) {
@@ -461,6 +462,7 @@ sub readCardsDB {
CHIPSET => sub { $card->{Chipset} = $val },
DRIVER => sub { $card->{Driver} = $val },
DRIVER2 => sub { $card->{Driver2} = $val },
+ DRIVER2_NO_SSE => sub { $card->{DRIVER2_NO_SSE} = $val },
NEEDVIDEORAM => sub { $card->{needVideoRam} = 1 },
DRI_GLX => sub { $card->{DRI_GLX} = 1 if $card->{Driver} },
DRI_GLX_EXPERIMENTAL => sub { $card->{DRI_GLX_EXPERIMENTAL} = 1 if $card->{Driver} },
diff --git a/lib/Xconfig/proprietary.pm b/lib/Xconfig/proprietary.pm
index a048717..e31b7ea 100644
--- a/lib/Xconfig/proprietary.pm
+++ b/lib/Xconfig/proprietary.pm
@@ -33,6 +33,19 @@ sub install_matrox_hal {
rm_rf("$tmpdir/$dir_in_tar");
}
+sub handle_DRIVER2_NO_SSE {
+ my ($card) = @_;
+
+ $card->{DRIVER2_NO_SSE} or return;
+
+ require detect_devices;
+ if (!detect_devices::has_cpu_flag('sse')) {
+ log::l("$card->{Driver2} need a processor featuring SSE, switching back to $card->{DRIVER2_NO_SSE}");
+ $card->{Driver2} = $card->{DRIVER2_NO_SSE};
+ }
+}
+
+
sub pkgs_for_Driver2 {
my ($Driver2, $do_pkgs) = @_;