mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-06 03:18:13 +00:00
The SDL_BUTTON_*MASK defines must come immediately after the SDL_MouseButtonFlags typedef to be associated
This commit is contained in:
@@ -147,6 +147,19 @@ typedef enum SDL_MouseWheelDirection
|
|||||||
*/
|
*/
|
||||||
typedef Uint32 SDL_MouseButtonFlags;
|
typedef Uint32 SDL_MouseButtonFlags;
|
||||||
|
|
||||||
|
#define SDL_BUTTON_LEFT 1
|
||||||
|
#define SDL_BUTTON_MIDDLE 2
|
||||||
|
#define SDL_BUTTON_RIGHT 3
|
||||||
|
#define SDL_BUTTON_X1 4
|
||||||
|
#define SDL_BUTTON_X2 5
|
||||||
|
|
||||||
|
#define SDL_BUTTON_MASK(X) (1u << ((X)-1))
|
||||||
|
#define SDL_BUTTON_LMASK SDL_BUTTON_MASK(SDL_BUTTON_LEFT)
|
||||||
|
#define SDL_BUTTON_MMASK SDL_BUTTON_MASK(SDL_BUTTON_MIDDLE)
|
||||||
|
#define SDL_BUTTON_RMASK SDL_BUTTON_MASK(SDL_BUTTON_RIGHT)
|
||||||
|
#define SDL_BUTTON_X1MASK SDL_BUTTON_MASK(SDL_BUTTON_X1)
|
||||||
|
#define SDL_BUTTON_X2MASK SDL_BUTTON_MASK(SDL_BUTTON_X2)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A callback used to transform mouse motion delta from raw values.
|
* A callback used to transform mouse motion delta from raw values.
|
||||||
*
|
*
|
||||||
@@ -186,20 +199,6 @@ typedef void (SDLCALL *SDL_MouseMotionTransformCallback)(
|
|||||||
float *x, float *y
|
float *x, float *y
|
||||||
);
|
);
|
||||||
|
|
||||||
#define SDL_BUTTON_LEFT 1
|
|
||||||
#define SDL_BUTTON_MIDDLE 2
|
|
||||||
#define SDL_BUTTON_RIGHT 3
|
|
||||||
#define SDL_BUTTON_X1 4
|
|
||||||
#define SDL_BUTTON_X2 5
|
|
||||||
|
|
||||||
#define SDL_BUTTON_MASK(X) (1u << ((X)-1))
|
|
||||||
#define SDL_BUTTON_LMASK SDL_BUTTON_MASK(SDL_BUTTON_LEFT)
|
|
||||||
#define SDL_BUTTON_MMASK SDL_BUTTON_MASK(SDL_BUTTON_MIDDLE)
|
|
||||||
#define SDL_BUTTON_RMASK SDL_BUTTON_MASK(SDL_BUTTON_RIGHT)
|
|
||||||
#define SDL_BUTTON_X1MASK SDL_BUTTON_MASK(SDL_BUTTON_X1)
|
|
||||||
#define SDL_BUTTON_X2MASK SDL_BUTTON_MASK(SDL_BUTTON_X2)
|
|
||||||
|
|
||||||
|
|
||||||
/* Function prototypes */
|
/* Function prototypes */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user