about summary refs log tree commit diff
path: root/pkgs/tools/X11/bumblebee/config.patch
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/X11/bumblebee/config.patch')
-rw-r--r--pkgs/tools/X11/bumblebee/config.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/pkgs/tools/X11/bumblebee/config.patch b/pkgs/tools/X11/bumblebee/config.patch
new file mode 100644
index 000000000000..61b671f80c1c
--- /dev/null
+++ b/pkgs/tools/X11/bumblebee/config.patch
@@ -0,0 +1,30 @@
+--- bumblebee-3.0/src/driver.c.orig	2012-02-03 14:51:10.282464426 +0100
++++ bumblebee-3.0/src/driver.c	2012-02-04 22:26:02.715498536 +0100
+@@ -23,6 +23,7 @@
+ #include "module.h"
+ #include "bblogger.h"
+ #include "driver.h"
++#include <stdlib.h>
+ 
+ /**
+  * Check what drivers are available and autodetect if possible. Driver, module
+@@ -30,6 +31,7 @@
+  */
+ void driver_detect(void) {
+   /* determine driver to be used */
++  set_string_value(&bb_config.driver, getenv("BUMBLEBEE_DRIVER"));
+   if (*bb_config.driver) {
+     bb_log(LOG_DEBUG, "Skipping auto-detection, using configured driver"
+             " '%s'\n", bb_config.driver);
+@@ -65,8 +67,8 @@
+     }
+   }
+ 
+-  if (strcmp(bb_config.driver, "nvidia")) {
+-    set_string_value(&bb_config.ld_path, CONF_LDPATH_NVIDIA);
+-    set_string_value(&bb_config.mod_path, CONF_MODPATH_NVIDIA);
++  if (!strcmp(bb_config.driver, "nvidia")) {
++    set_string_value(&bb_config.ld_path, getenv("BUMBLEBEE_LDPATH_NVIDIA"));
++    set_string_value(&bb_config.mod_path, getenv("BUMBLEBEE_MODPATH_NVIDIA"));
+   }
+ }