Merge branch 'master' into blender2.8
[blender.git] / intern / ghost / intern / GHOST_WindowWin32.cpp
index 3afc3f9c1b9f77b4a96e0afceb01db61a2c0d588..fc4979291ec27876b466723a4eff1fe9b284b1d0 100644 (file)
@@ -861,19 +861,14 @@ void GHOST_WindowWin32::processWin32TabletEvent(WPARAM wParam, LPARAM lParam)
                if (fpWTPacket) {
                        if (fpWTPacket((HCTX)lParam, wParam, &pkt)) {
                                if (m_tabletData) {
-                                       switch (pkt.pkCursor) {
-                                               case 0: /* first device */
-                                               case 3: /* second device */
+                                       switch (pkt.pkCursor % 3) { /* % 3 for multiple devices ("DualTrack") */
+                                               case 0:
                                                        m_tabletData->Active = GHOST_kTabletModeNone; /* puck - not yet supported */
                                                        break;
                                                case 1:
-                                               case 4:
-                                               case 7:
                                                        m_tabletData->Active = GHOST_kTabletModeStylus; /* stylus */
                                                        break;
                                                case 2:
-                                               case 5:
-                                               case 8:
                                                        m_tabletData->Active = GHOST_kTabletModeEraser; /* eraser */
                                                        break;
                                        }