Fixed bug #464
Added X1/X2 button constants --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402668
This commit is contained in:
parent
722780a3c1
commit
1a95219d9e
2 changed files with 6 additions and 2 deletions
|
@ -207,9 +207,13 @@ extern DECLSPEC int SDLCALL SDL_ShowCursor(int toggle);
|
|||
#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_LMASK SDL_BUTTON(SDL_BUTTON_LEFT)
|
||||
#define SDL_BUTTON_MMASK SDL_BUTTON(SDL_BUTTON_MIDDLE)
|
||||
#define SDL_BUTTON_RMASK SDL_BUTTON(SDL_BUTTON_RIGHT)
|
||||
#define SDL_BUTTON_X1MASK SDL_BUTTON(SDL_BUTTON_X1)
|
||||
#define SDL_BUTTON_X2MASK SDL_BUTTON(SDL_BUTTON_X2)
|
||||
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
|
|
|
@ -590,12 +590,12 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
|||
break;
|
||||
case WM_XBUTTONDOWN:
|
||||
xbuttonval = GET_XBUTTON_WPARAM(wParam);
|
||||
button = SDL_BUTTON_RIGHT + xbuttonval;
|
||||
button = SDL_BUTTON_X1 + xbuttonval - 1;
|
||||
state = SDL_PRESSED;
|
||||
break;
|
||||
case WM_XBUTTONUP:
|
||||
xbuttonval = GET_XBUTTON_WPARAM(wParam);
|
||||
button = SDL_BUTTON_RIGHT + xbuttonval;
|
||||
button = SDL_BUTTON_X1 + xbuttonval - 1;
|
||||
state = SDL_RELEASED;
|
||||
break;
|
||||
default:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue