openrgb: import patch to fix duplicate listing of devices

This commit is contained in:
John 2021-12-20 21:36:16 +01:00
parent b79aeb08c3
commit 2b12a413ac
2 changed files with 34 additions and 1 deletions

View file

@ -0,0 +1,33 @@
From 82db3d9971c7d153b8d506909568ee378bc513aa Mon Sep 17 00:00:00 2001
From: Martin Hartl <g@inlart.com>
Date: Fri, 1 Jan 2021 18:42:31 +0100
Subject: [PATCH] Support hidraw USAGE/USAGE_PAGE
* Support hidapi 0.10.1 and newer
---
OpenRGB.pro | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/OpenRGB.pro b/OpenRGB.pro
index ff2d656a..60542ced 100644
--- a/OpenRGB.pro
+++ b/OpenRGB.pro
@@ -669,6 +669,15 @@ unix:!macx {
#-------------------------------------------------------------------------------------------#
packagesExist(hidapi-hidraw) {
LIBS += -lhidapi-hidraw
+
+ #---------------------------------------------------------------------------------------#
+ # hidapi-hidraw >= 0.10.1 supports USAGE/USAGE_PAGE #
+ # Define USE_HID_USAGE if hidapi-hidraw supports it #
+ #---------------------------------------------------------------------------------------#
+ HIDAPI_HIDRAW_VERSION = $$system(pkg-config --modversion hidapi-hidraw)
+ if(versionAtLeast(HIDAPI_HIDRAW_VERSION, "0.10.1")) {
+ DEFINES += USE_HID_USAGE
+ }
} else {
packagesExist(hidapi-libusb) {
LIBS += -lhidapi-libusb
--
GitLab

View file

@ -1,7 +1,7 @@
# Template file for 'openrgb'
pkgname=openrgb
version=0.5
revision=1
revision=2
wrksrc=OpenRGB-release_${version}
build_style=qmake
hostmakedepends="qt5-qmake qt5-host-tools git pkg-config"