From 1d66d1e2dad482410788344edb7ae033c5e88c5f Mon Sep 17 00:00:00 2001 From: "Christoph \"baka0815\" Schwerdtfeger" Date: Mon, 27 Aug 2018 09:53:54 +0200 Subject: [PATCH] evdev: Search for libevdev.so.2 first Many Linux distributions provide livevdev.so.2 only so check that first. --- core/linux-dist/evdev.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/linux-dist/evdev.cpp b/core/linux-dist/evdev.cpp index 9b7e83b5d..ae7bd54fc 100644 --- a/core/linux-dist/evdev.cpp +++ b/core/linux-dist/evdev.cpp @@ -21,12 +21,12 @@ void load_libevdev() { if (libevdev_tried) - { return; - } libevdev_tried = true; - void* lib_handle = dlopen("libevdev.so", RTLD_NOW); + void* lib_handle = dlopen("libevdev.so.2", RTLD_NOW); + if (!lib_handle) // libevdev.so.2 not found, fallback to libevdev.so + lib_handle = dlopen("libevdev.so", RTLD_NOW); bool failed = false; @@ -56,7 +56,7 @@ } } - if(failed) + if (failed) { puts("WARNING: libevdev is not available. You'll not be able to use button names instead of numeric codes in your controller mappings!\n"); return;