Fix T51948: pen pressure not detected with some Wacom tablets.

Generalizes current conditions, QT implements it the same way.
This commit is contained in:
James Fulop 2017-07-24 13:32:16 +02:00 committed by Brecht Van Lommel
parent f65a8bbdb7
commit c3c0495b30
Notes: blender-bot 2023-02-14 06:49:57 +01:00
Referenced by issue #51948, Pen pressure cannot be detected on Wacom Cintiq Pro 16
1 changed files with 2 additions and 7 deletions

View File

@ -890,19 +890,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;
}