diff options
author | Robin Burchell <robin.burchell@collabora.co.uk> | 2012-07-05 14:37:21 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-07-06 00:37:39 +0200 |
commit | 0823fa2c61b9105a9729fbeb3f5c411143e27760 (patch) | |
tree | efc3443fa64511c2d8ee9c913156ba88db8dedcf /src/platformsupport/devicediscovery | |
parent | 58e997b2d26a9d58533c7cae06217bdc0ab9aaef (diff) |
android: work around android's linux/input.h being retarded.
It seemingly doesn't include many of the required defines for evdev, so do what
everyone else seems to do, and work around it.
Change-Id: I4a6ffb548c7370f675c736177b63220f034d06b8
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Diffstat (limited to 'src/platformsupport/devicediscovery')
-rw-r--r-- | src/platformsupport/devicediscovery/qdevicediscovery_static.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/platformsupport/devicediscovery/qdevicediscovery_static.cpp b/src/platformsupport/devicediscovery/qdevicediscovery_static.cpp index 2d89493d6b..9b063cee46 100644 --- a/src/platformsupport/devicediscovery/qdevicediscovery_static.cpp +++ b/src/platformsupport/devicediscovery/qdevicediscovery_static.cpp @@ -51,6 +51,20 @@ #include <linux/input.h> #include <fcntl.h> +/* android (and perhaps some other linux-derived stuff) don't define everything + * in linux/input.h, so we'll need to do that ourselves. + */ +#ifndef KEY_CNT +#define KEY_CNT (KEY_MAX+1) +#endif +#ifndef REL_CNT +#define REL_CNT (REL_MAX+1) +#endif +#ifndef ABS_CNT +#define ABS_CNT (ABS_MAX+1) +#endif + + //#define QT_QPA_DEVICE_DISCOVERY_DEBUG #ifdef QT_QPA_DEVICE_DISCOVERY_DEBUG |