Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fixed bug #642
Browse files Browse the repository at this point in the history
 Gerry JJ      2008-11-09 02:11:49 PST

The SDL_MouseMotionEvent struct has a field named "tilt" (currently marked "for
future use"), for tablet stylus tilt information.  However, one value is not
enough for this, as tilt is two-dimensional.  Reserving only one field for
future use is no good when you're going to need two, so there should be two
fields, tilt_x and tilt_y.
  • Loading branch information
slouken committed Dec 16, 2009
1 parent 8616609 commit 2e21c8a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion include/SDL_events.h
Expand Up @@ -186,7 +186,8 @@ typedef struct SDL_MouseMotionEvent
int pressure_max; /**< Maximum value of the pressure reported by the device */
int pressure_min; /**< Minimum value of the pressure reported by the device */
int rotation; /**< For future use */
int tilt; /**< For future use */
int tilt_x; /**< For future use */
int tilt_y; /**< For future use */
int cursor; /**< The cursor being used in the event */
int xrel; /**< The relative motion in the X direction */
int yrel; /**< The relative motion in the Y direction */
Expand Down
3 changes: 2 additions & 1 deletion src/events/SDL_mouse.c
Expand Up @@ -473,7 +473,8 @@ SDL_SendMouseMotion(int id, int relative, int x, int y, int pressure)
event.motion.pressure_max = mouse->pressure_max;
event.motion.pressure_min = mouse->pressure_min;
event.motion.rotation = 0;
event.motion.tilt = 0;
event.motion.tilt_x = 0;
event.motion.tilt_y = 0;
event.motion.cursor = mouse->current_end;
event.motion.xrel = xrel;
event.motion.yrel = yrel;
Expand Down

0 comments on commit 2e21c8a

Please sign in to comment.