Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Erwin <significant.bit@gmail.com>2014-12-06 10:48:51 +0300
committerMike Erwin <significant.bit@gmail.com>2014-12-06 10:48:51 +0300
commitc077f5fa0863796ce7e76772408306bcea90cde3 (patch)
treee2c2b92fbd17d3809c72369eaf98f1f7a1ad30da
parentc8995ecc835d6fa7093bd76dd4ba031ac27465bd (diff)
Fix T42789: support 3Dconnexion wireless devices
SpaceMouse Wireless SpaceMouse Pro Wireless Device info is from user reports. I don’t yet have the new devices, so these are untested but likely to work :D
-rw-r--r--intern/ghost/intern/GHOST_NDOFManager.cpp25
-rw-r--r--intern/ghost/intern/GHOST_NDOFManager.h2
2 files changed, 26 insertions, 1 deletions
diff --git a/intern/ghost/intern/GHOST_NDOFManager.cpp b/intern/ghost/intern/GHOST_NDOFManager.cpp
index 9bd6226d5c2..86020e18082 100644
--- a/intern/ghost/intern/GHOST_NDOFManager.cpp
+++ b/intern/ghost/intern/GHOST_NDOFManager.cpp
@@ -228,7 +228,7 @@ bool GHOST_NDOFManager::setDevice(unsigned short vendor_id, unsigned short produ
// that I don't have access to. Thanks!
switch (vendor_id) {
- case 0x046D: // Logitech (3Dconnexion)
+ case 0x046D: // Logitech (3Dconnexion was a subsidiary)
switch (product_id) {
// -- current devices --
case 0xC626: // full-size SpaceNavigator
@@ -281,6 +281,29 @@ bool GHOST_NDOFManager::setDevice(unsigned short vendor_id, unsigned short produ
printf("ndof: unknown Logitech product %04hx\n", product_id);
}
break;
+ case 0x256F: // 3Dconnexion
+ switch (product_id) {
+ case 0xC62E: // plugged in
+ case 0xC62F: // wireless
+ puts("ndof: using SpaceMouse Wireless");
+ m_deviceType = NDOF_SpaceMouseWireless;
+ m_buttonCount = 2;
+ m_hidMap = Modern3Dx_HID_map;
+ break;
+ case 0xC631: // plugged in
+ case 0xC632: // wireless
+ puts("ndof: using SpaceMouse Pro Wireless");
+ m_deviceType = NDOF_SpaceMouseProWireless;
+ m_buttonCount = 27;
+ // ^^ actually has 15 buttons, but their HID codes range from 0 to 26
+ m_buttonMask = 0x07C0F137;
+ m_hidMap = Modern3Dx_HID_map;
+ break;
+
+ default:
+ printf("ndof: unknown 3Dconnexion product %04hx\n", product_id);
+ }
+ break;
default:
printf("ndof: unknown device %04hx:%04hx\n", vendor_id, product_id);
}
diff --git a/intern/ghost/intern/GHOST_NDOFManager.h b/intern/ghost/intern/GHOST_NDOFManager.h
index 0b2080e36a9..8d6edf38473 100644
--- a/intern/ghost/intern/GHOST_NDOFManager.h
+++ b/intern/ghost/intern/GHOST_NDOFManager.h
@@ -38,6 +38,8 @@ typedef enum {
NDOF_SpaceExplorer,
NDOF_SpacePilotPro,
NDOF_SpaceMousePro,
+ NDOF_SpaceMouseWireless,
+ NDOF_SpaceMouseProWireless,
// older devices
NDOF_SpacePilot,