aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMartin Wimpress <code@flexion.org>2022-04-05 13:14:54 +0100
committerMartin Wimpress <code@flexion.org>2022-04-05 13:14:54 +0100
commitdbc0a8debda1075a91d0d69ef2d988e711f86b53 (patch)
tree347162e1b1a315000857406027f602fdcc38d439 /src
parent56a3011c5e03f8217de3bddf6b1b11785a736665 (diff)
downloadayatana-indicator-power-dbc0a8debda1075a91d0d69ef2d988e711f86b53.tar.gz
ayatana-indicator-power-dbc0a8debda1075a91d0d69ef2d988e711f86b53.tar.bz2
ayatana-indicator-power-dbc0a8debda1075a91d0d69ef2d988e711f86b53.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/device.c5
-rw-r--r--src/device.h1
2 files changed, 6 insertions, 0 deletions
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;