Instead of setting based on set/unset, allow users to use boolean values.
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/main
-LOCAL_STATIC_LIBRARIES := libmesa_loader
+LOCAL_STATIC_LIBRARIES := \
+ libmesa_util \
+ libmesa_loader
+
LOCAL_MODULE := libgbm
LOCAL_SRC_FILES := \
libgbm_la_LIBADD = \
$(top_builddir)/src/loader/libloader.la \
+ $(top_builddir)/src/util/libmesautil.la \
$(top_builddir)/src/util/libxmlconfig.la \
$(DLOPEN_LIBS)
#include "gbmint.h"
#include "loader.h"
+#include "util/debug.h"
#include "util/macros.h"
/* For importing wl_buffer */
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)
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)