@@ -247,7 +247,7 @@ private void handleDropEvent(SDL_DropEvent evtDrop)
247247 }
248248 }
249249
250- private readonly SDL_FingerID ? [ ] activeTouches = new SDL_FingerID ? [ TouchState . MAX_TOUCH_COUNT ] ;
250+ private readonly SDL_FingerID ? [ ] activeTouches = new SDL_FingerID ? [ TouchState . MAX_NATIVE_TOUCH_COUNT ] ;
251251
252252 private TouchSource ? getTouchSource ( SDL_FingerID fingerId )
253253 {
@@ -270,7 +270,7 @@ private void handleDropEvent(SDL_DropEvent evtDrop)
270270 return ( TouchSource ) i ;
271271 }
272272
273- // we only handle up to TouchState.MAX_TOUCH_COUNT . Ignore any further touches for now.
273+ // we only handle up to TouchState.MAX_NATIVE_TOUCH_COUNT . Ignore any further touches for now.
274274 return null ;
275275 }
276276
@@ -532,12 +532,12 @@ private void handleKeyboardEvent(SDL_KeyboardEvent evtKey)
532532
533533 private void handlePenMotionEvent ( SDL_PenMotionEvent evtPenMotion )
534534 {
535- PenMove ? . Invoke ( new Vector2 ( evtPenMotion . x , evtPenMotion . y ) * Scale ) ;
535+ PenMove ? . Invoke ( new Vector2 ( evtPenMotion . x , evtPenMotion . y ) * Scale , evtPenMotion . pen_state . HasFlagFast ( SDL_PenInputFlags . SDL_PEN_INPUT_DOWN ) ) ;
536536 }
537537
538538 private void handlePenTouchEvent ( SDL_PenTouchEvent evtPenTouch )
539539 {
540- PenTouch ? . Invoke ( evtPenTouch . down ) ;
540+ PenTouch ? . Invoke ( evtPenTouch . down , new Vector2 ( evtPenTouch . x , evtPenTouch . y ) * Scale ) ;
541541 }
542542
543543 /// <summary>
@@ -743,14 +743,15 @@ private void updateConfineMode()
743743 public event Action < Touch > ? TouchUp ;
744744
745745 /// <summary>
746- /// Invoked when a pen moves.
746+ /// Invoked when a pen moves. Passes pen position and whether the pen is touching the tablet surface.
747747 /// </summary>
748- public event Action < Vector2 > ? PenMove ;
748+ public event Action < Vector2 , bool > ? PenMove ;
749749
750750 /// <summary>
751751 /// Invoked when a pen touches (<c>true</c>) or lifts (<c>false</c>) from the tablet surface.
752+ /// Also passes the current position of the pen.
752753 /// </summary>
753- public event Action < bool > ? PenTouch ;
754+ public event Action < bool , Vector2 > ? PenTouch ;
754755
755756 /// <summary>
756757 /// Invoked when a <see cref="TabletPenButton">pen button</see> is pressed (<c>true</c>) or released (<c>false</c>).
0 commit comments