aboutsummaryrefslogtreecommitdiffstats
path: root/src/gbm/backends
diff options
context:
space:
mode:
authorEric Engestrom <[email protected]>2017-09-08 11:39:43 +0100
committerEric Engestrom <[email protected]>2017-09-12 13:53:11 +0100
commit6ea8db5b4ca467717b2fd4b69fc8b97fe29ffe1f (patch)
tree49cee65aed808ad1233ee0d6ff857a03d12d81d1 /src/gbm/backends
parentf940b1665a7f17ad2ae7ae2e951d90d151482875 (diff)
gbm: turn GBM_ALWAYS_SOFTWARE into a boolean
Instead of setting based on set/unset, allow users to use boolean values. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/gbm/backends')
-rw-r--r--src/gbm/backends/dri/gbm_dri.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gbm/backends/dri/gbm_dri.c b/src/gbm/backends/dri/gbm_dri.c
index 1b2cc4ce765..46285245658 100644
--- a/src/gbm/backends/dri/gbm_dri.c
+++ b/src/gbm/backends/dri/gbm_dri.c
@@ -48,6 +48,7 @@
#include "gbmint.h"
#include "loader.h"
+#include "util/debug.h"
#include "util/macros.h"
/* For importing wl_buffer */
@@ -1336,7 +1337,8 @@ static struct gbm_device *
dri_device_create(int fd)
{
struct gbm_dri_device *dri;
- int ret, force_sw;
+ int ret;
+ bool force_sw;
dri = calloc(1, sizeof *dri);
if (!dri)
@@ -1364,7 +1366,7 @@ dri_device_create(int fd)
mtx_init(&dri->mutex, mtx_plain);
- force_sw = getenv("GBM_ALWAYS_SOFTWARE") != NULL;
+ force_sw = env_var_as_boolean("GBM_ALWAYS_SOFTWARE", false);
if (!force_sw) {
ret = dri_screen_create(dri);
if (ret)