[gnome-bluetooth/wip/hadess/icade: 2/4] lib: Make iCade appear as a joypad, not a keyboard
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-bluetooth/wip/hadess/icade: 2/4] lib: Make iCade appear as a joypad, not a keyboard
- Date: Sun, 20 Sep 2020 15:23:10 +0000 (UTC)
commit 5a0a6f3a66a28f7e57ec7f91f37194a8cfc2fc21
Author: Bastien Nocera <hadess hadess net>
Date: Sun Sep 20 17:02:29 2020 +0200
lib: Make iCade appear as a joypad, not a keyboard
lib/bluetooth-client.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
---
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));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]