Skip to content
Permalink
Browse files

Fixed bug #464

Added X1/X2 button constants
  • Loading branch information
slouken committed Dec 29, 2007
1 parent d00c582 commit 2da7adf5f47edf88cef3c5d9042d689f6f1761d4
Showing with 9 additions and 2 deletions.
  1. +3 −0 WhatsNew
  2. +4 −0 include/SDL_mouse.h
  3. +2 −2 src/video/wincommon/SDL_sysevents.c
@@ -3,6 +3,9 @@ This is a list of API changes in SDL's version history.

Version 1.0:

1.2.13:
Added SDL_BUTTON_X1 and SDL_BUTTON_X2 constants.

1.2.12:
Added SDL_VIDEO_ALLOW_SCREENSAVER to override SDL's disabling
of the screensaver on Mac OS X and X11.
@@ -122,9 +122,13 @@ extern DECLSPEC int SDLCALL SDL_ShowCursor(int toggle);
#define SDL_BUTTON_RIGHT 3
#define SDL_BUTTON_WHEELUP 4
#define SDL_BUTTON_WHEELDOWN 5
#define SDL_BUTTON_X1 6
#define SDL_BUTTON_X2 7
#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++ */
@@ -520,12 +520,12 @@ LRESULT CALLBACK WinMessage(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
break;
case WM_XBUTTONDOWN:
xbuttonval = GET_XBUTTON_WPARAM(wParam);
button = SDL_BUTTON_WHEELDOWN + xbuttonval;
button = SDL_BUTTON_X1 + xbuttonval - 1;
state = SDL_PRESSED;
break;
case WM_XBUTTONUP:
xbuttonval = GET_XBUTTON_WPARAM(wParam);
button = SDL_BUTTON_WHEELDOWN + xbuttonval;
button = SDL_BUTTON_X1 + xbuttonval - 1;
state = SDL_RELEASED;
break;
default:

0 comments on commit 2da7adf

Please sign in to comment.