summaryrefslogtreecommitdiff
path: root/src/linux/hidpp-device.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/linux/hidpp-device.c')
-rw-r--r--src/linux/hidpp-device.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/linux/hidpp-device.c b/src/linux/hidpp-device.c
index 78216ca..8e7e692 100644
--- a/src/linux/hidpp-device.c
+++ b/src/linux/hidpp-device.c
@@ -603,7 +603,11 @@ hidpp_device_refresh (HidppDevice *device,
error);
if (!ret) {
if (hidpp_is_error(&msg, &error_code) &&
- (error_code == HIDPP10_ERROR_CODE_INVALID_SUBID)) {
+ (error_code == HIDPP10_ERROR_CODE_INVALID_SUBID ||
+ /* if a device is unreachable, assume HID++ 1.0.
+ * Otherwise, the device won't show up at
+ * enumeration time. */
+ error_code == HIDPP10_ERROR_CODE_RESOURCE_ERROR)) {
/* assume HID++ 1.0 ping response */
priv->version = 1;
g_error_free(*error);