mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 00:37:51 -06:00
3D connexion devides -> Added handling of 3 bytes long button packets
This commit is contained in:
parent
55a4b99e44
commit
68d6a45815
1 changed files with 5 additions and 1 deletions
|
@ -569,6 +569,9 @@ void Mouse3DController::collect_input()
|
||||||
updated = handle_packet(packet);
|
updated = handle_packet(packet);
|
||||||
else if (res == 13)
|
else if (res == 13)
|
||||||
updated = handle_wireless_packet(packet);
|
updated = handle_wireless_packet(packet);
|
||||||
|
else if ((res == 3) && (packet[0] == 3))
|
||||||
|
// On Mac button packets can be 3 bytes long
|
||||||
|
updated = handle_packet(packet);
|
||||||
#if ENABLE_3DCONNEXION_DEVICES_DEBUG_OUTPUT
|
#if ENABLE_3DCONNEXION_DEVICES_DEBUG_OUTPUT
|
||||||
else if (res > 0)
|
else if (res > 0)
|
||||||
std::cout << "Got unknown data packet of length: " << res << ", code:" << (int)packet[0] << std::endl;
|
std::cout << "Got unknown data packet of length: " << res << ", code:" << (int)packet[0] << std::endl;
|
||||||
|
@ -599,7 +602,8 @@ bool Mouse3DController::handle_packet(const DataPacket& packet)
|
||||||
}
|
}
|
||||||
case 3: // Button
|
case 3: // Button
|
||||||
{
|
{
|
||||||
if (handle_packet_button(packet, 6))
|
unsigned int size = packet.size();
|
||||||
|
if (handle_packet_button(packet, packet.size() - 1))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue