mirror of
https://github.com/libratbag/libratbag.git
synced 2026-11-07 15:14:38 +01:00
Start moving uLogitech files into libratbag proper
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
@@ -4,14 +4,19 @@ include_HEADERS = \
|
||||
libratbag.h
|
||||
|
||||
libratbag_la_SOURCES = \
|
||||
debug.h \
|
||||
etekcity.c \
|
||||
hidpp10.c \
|
||||
hidpp10.h \
|
||||
libratbag.c \
|
||||
libratbag.h \
|
||||
libratbag-hidraw.c \
|
||||
libratbag-hidraw.h \
|
||||
libratbag-util.c \
|
||||
libratbag-private.h \
|
||||
libratbag-util.h
|
||||
libratbag-util.h \
|
||||
unifying.h \
|
||||
unifying.c
|
||||
|
||||
libratbag_la_LIBADD = $(LIBUDEV_LIBS)
|
||||
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
* https://drive.google.com/folderview?id=0BxbRzx7vEV7eWmgwazJ3NUFfQ28&usp=sharing
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
@@ -38,11 +40,7 @@
|
||||
#include <debug.h>
|
||||
#include <hidpp10.h>
|
||||
|
||||
#define MIN(a,b) \
|
||||
({ __typeof__ (a) _a = (a); \
|
||||
__typeof__ (b) _b = (b); \
|
||||
_a < _b ? _a : _b; \
|
||||
})
|
||||
#include <libratbag-util.h>
|
||||
|
||||
#if DEBUG_LVL > 0
|
||||
const char *hidpp_errors[0xFF] = {
|
||||
@@ -250,7 +248,7 @@ static int hidpp10_get_device_info(int fd, struct unifying_device *dev) {
|
||||
|
||||
name_size = device_name.msg.string[1];
|
||||
memcpy(dev->name, &device_name.msg.string[2], sizeof(device_name.msg.string));
|
||||
dev->name[MIN(name_size, sizeof(dev->name) - 1)] = '\0';
|
||||
dev->name[min(name_size, sizeof(dev->name) - 1)] = '\0';
|
||||
|
||||
/*
|
||||
* This may fail on some devices
|
||||
Reference in New Issue
Block a user