From dbc0a8debda1075a91d0d69ef2d988e711f86b53 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Tue, 5 Apr 2022 13:14:54 +0100 Subject: Add support for gaming-input devices with internal batteries This pull requests add support for battery powered gaming-input devices. Tested with Razer Wolverine V2 Chroma and Scuf Instinct Pro. See: https://pad.lv/1967854 --- src/device.c | 5 +++++ src/device.h | 1 + 2 files changed, 6 insertions(+) diff --git a/src/device.c b/src/device.c index aeffccd..753a7b0 100644 --- a/src/device.c +++ b/src/device.c @@ -387,6 +387,7 @@ device_kind_to_string (UpDeviceKind kind) case UP_DEVICE_KIND_MEDIA_PLAYER: return "media-player"; case UP_DEVICE_KIND_TABLET: return "tablet"; case UP_DEVICE_KIND_COMPUTER: return "computer"; + case UP_DEVICE_KIND_GAMING_INPUT: return "gaming-input"; default: return "unknown"; } } @@ -563,6 +564,10 @@ device_kind_to_localised_string (UpDeviceKind kind) /* TRANSLATORS: tablet device */ text = _("Computer"); break; + case UP_DEVICE_KIND_GAMING_INPUT: + /* TRANSLATORS: game controller/joystick with internal batteries */ + text = _("Gaming input"); + break; case UP_DEVICE_KIND_UNKNOWN: /* TRANSLATORS: unknown device */ text = _("Unknown"); diff --git a/src/device.h b/src/device.h index fad959a..1186cee 100644 --- a/src/device.h +++ b/src/device.h @@ -60,6 +60,7 @@ typedef enum UP_DEVICE_KIND_MEDIA_PLAYER, UP_DEVICE_KIND_TABLET, UP_DEVICE_KIND_COMPUTER, + UP_DEVICE_KIND_GAMING_INPUT, UP_DEVICE_KIND_LAST } UpDeviceKind; -- cgit v1.2.3