implement eraser detection on windows

This commit is contained in:
2018-10-09 02:12:09 +02:00
parent dba5eef824
commit a6d0914bf8
11 changed files with 95 additions and 35 deletions

View File

@@ -166,7 +166,7 @@ void WacomTablet::handle_message(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lPar
static POINT ptOld, ptNew;
static UINT prsOld, prsNew;
if (gpWTPacket((HCTX)lParam, wParam, &pkt))
if (gpWTPacket((HCTX)lParam, (UINT)wParam, &pkt))
{
if (HIWORD(pkt.pkButtons) == TBN_DOWN)
m_pen_down = true;
@@ -183,6 +183,9 @@ void WacomTablet::handle_message(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lPar
m_pen_pos = { pkt.pkX, pkt.pkX };
m_pen_pres = (float)pkt.pkNormalPressure / (float)TabletPressure.axMax;
m_stylus = true;
m_eraser = (pkt.pkStatus == 0x10);
//LOG("packet %x", pkt.pkStatus);
}
}