summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2020-09-20 17:02:29 +0200
committerBastien Nocera <hadess@hadess.net>2020-09-20 17:16:44 +0200
commit5a0a6f3a66a28f7e57ec7f91f37194a8cfc2fc21 (patch)
tree403c3da3a1c6a5ca3488d6b940db751e8d9f803e
parent1f8f3a2e78b279612712e2e6f8b933d9737cf561 (diff)
downloadgnome-bluetooth-5a0a6f3a66a28f7e57ec7f91f37194a8cfc2fc21.tar.gz
lib: Make iCade appear as a joypad, not a keyboard
-rw-r--r--lib/bluetooth-client.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/bluetooth-client.c b/lib/bluetooth-client.c
index d35725bc..3e1ee392 100644
--- a/lib/bluetooth-client.c
+++ b/lib/bluetooth-client.c
@@ -297,7 +297,14 @@ device_resolve_type_and_icon (Device1 *device, BluetoothType *type, const char *
g_return_if_fail (type);
g_return_if_fail (icon);
- *type = bluetooth_appearance_to_type (device1_get_appearance (device));
+ if (g_strcmp0 (device1_get_name (device), "ION iCade Game Controller") == 0) {
+ *type = BLUETOOTH_TYPE_JOYPAD;
+ *icon = "input-gaming";
+ return;
+ }
+
+ if (*type == 0 || *type == BLUETOOTH_TYPE_ANY)
+ *type = bluetooth_appearance_to_type (device1_get_appearance (device));
if (*type == 0 || *type == BLUETOOTH_TYPE_ANY)
*type = bluetooth_class_to_type (device1_get_class (device));