pen: Report SDL_PenInputFlags in SDL_PenProximityEvent.

Fixes #16125.
This commit is contained in:
Ryan C. Gordon
2026-08-18 16:05:55 -04:00
parent f2c4ef111d
commit 3bdb7d00d5
2 changed files with 2 additions and 0 deletions

View File

@@ -913,6 +913,7 @@ typedef struct SDL_PenProximityEvent
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
SDL_WindowID windowID; /**< The window with pen focus, if any */
SDL_PenID which; /**< The pen instance id */
SDL_PenInputFlags pen_state; /**< Complete pen input state at time of event */
} SDL_PenProximityEvent;
/**

View File

@@ -674,6 +674,7 @@ void SDL_SendPenProximity(Uint64 timestamp, SDL_PenID instance_id, SDL_Window *w
event.pproximity.timestamp = timestamp;
event.pproximity.windowID = window ? window->id : 0;
event.pproximity.which = instance_id;
event.pproximity.pen_state = input_state;
SDL_PushEvent(&event);
}
}