mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-01-08 08:10:14 +01:00
tools: record: when running from the builddir, load the quirks correctly
Fixes #324 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
b436585b5e
commit
9c2ac8f9ee
1 changed files with 8 additions and 0 deletions
|
|
@ -45,6 +45,7 @@
|
|||
#include "libinput-version.h"
|
||||
#include "libinput-git-version.h"
|
||||
#include "shared.h"
|
||||
#include "builddir.h"
|
||||
|
||||
static const int FILE_VERSION_NUMBER = 1;
|
||||
|
||||
|
|
@ -1735,10 +1736,17 @@ print_device_quirks(struct record_context *ctx, struct record_device *dev)
|
|||
struct quirks_context *quirks;
|
||||
const char *data_path = LIBINPUT_QUIRKS_DIR;
|
||||
const char *override_file = LIBINPUT_QUIRKS_OVERRIDE_FILE;
|
||||
const char *builddir = NULL;
|
||||
|
||||
if (stat(dev->devnode, &st) < 0)
|
||||
return;
|
||||
|
||||
if ((builddir = builddir_lookup())) {
|
||||
setenv("LIBINPUT_QUIRKS_DIR", LIBINPUT_QUIRKS_SRCDIR, 0);
|
||||
data_path = LIBINPUT_QUIRKS_SRCDIR;
|
||||
override_file = NULL;
|
||||
}
|
||||
|
||||
quirks = quirks_init_subsystem(data_path,
|
||||
override_file,
|
||||
quirks_log_handler,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue