mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-06 14:43:20 +00:00
pen: Dramatic improvements to proximity information.
Now everything will attempt to track pens through proximity changes (instead of removing the pen entirely). testpen.c has been updated to reflect this. Some platforms and devices are better at this than others, but this seems like a significant usability improvement across the board. Fixes #12992.
This commit is contained in:
parent
0cc3354731
commit
99d7dad7e6
14 changed files with 206 additions and 103 deletions
|
|
@ -92,13 +92,14 @@ typedef Uint32 SDL_PenID;
|
|||
*/
|
||||
typedef Uint32 SDL_PenInputFlags;
|
||||
|
||||
#define SDL_PEN_INPUT_DOWN (1u << 0) /**< pen is pressed down */
|
||||
#define SDL_PEN_INPUT_BUTTON_1 (1u << 1) /**< button 1 is pressed */
|
||||
#define SDL_PEN_INPUT_BUTTON_2 (1u << 2) /**< button 2 is pressed */
|
||||
#define SDL_PEN_INPUT_BUTTON_3 (1u << 3) /**< button 3 is pressed */
|
||||
#define SDL_PEN_INPUT_BUTTON_4 (1u << 4) /**< button 4 is pressed */
|
||||
#define SDL_PEN_INPUT_BUTTON_5 (1u << 5) /**< button 5 is pressed */
|
||||
#define SDL_PEN_INPUT_ERASER_TIP (1u << 30) /**< eraser tip is used */
|
||||
#define SDL_PEN_INPUT_DOWN (1u << 0) /**< pen is pressed down */
|
||||
#define SDL_PEN_INPUT_BUTTON_1 (1u << 1) /**< button 1 is pressed */
|
||||
#define SDL_PEN_INPUT_BUTTON_2 (1u << 2) /**< button 2 is pressed */
|
||||
#define SDL_PEN_INPUT_BUTTON_3 (1u << 3) /**< button 3 is pressed */
|
||||
#define SDL_PEN_INPUT_BUTTON_4 (1u << 4) /**< button 4 is pressed */
|
||||
#define SDL_PEN_INPUT_BUTTON_5 (1u << 5) /**< button 5 is pressed */
|
||||
#define SDL_PEN_INPUT_ERASER_TIP (1u << 30) /**< eraser tip is used */
|
||||
#define SDL_PEN_INPUT_IN_PROXIMITY (1u << 31) /**< pen is in proximity (since SDL 3.4.0) */
|
||||
|
||||
/**
|
||||
* Pen axis indices.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue