implement eraser detection on windows
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user