diff --git a/WhatsNew b/WhatsNew
index 80deb3999..d9d86c8f2 100644
--- a/WhatsNew
+++ b/WhatsNew
@@ -3,6 +3,11 @@ This is a list of API changes in SDL's version history.
Version 1.0:
+1.2.5:
+ Added SDL_BUTTON_WHEELUP (4) and SDL_BUTTON_WHEELDOWN (5)
+
+ Added SDL_GL_STEREO for stereoscopic OpenGL contexts
+
1.2.0:
Added SDL_VIDEOEXPOSE event to signal that the screen needs to
be redrawn. This is currently only delivered to OpenGL windows
diff --git a/docs.html b/docs.html
index 318352d43..65a2aa288 100644
--- a/docs.html
+++ b/docs.html
@@ -16,6 +16,7 @@ be found at the main SDL page.
Major changes since SDL 1.0.0:
+ - 1.2.5: Added SDL_BUTTON_WHEELUP (4) and SDL_BUTTON_WHEELDOWN (5)
- 1.2.5: Added SDL_GL_STEREO for stereoscopic OpenGL contexts
- 1.2.5: Fixed VidMode error when running on XFree86 3.3
- 1.2.5: Added initial support for PicoGUI (thanks Micah!)
diff --git a/include/SDL_mouse.h b/include/SDL_mouse.h
index 101bff036..45795f953 100644
--- a/include/SDL_mouse.h
+++ b/include/SDL_mouse.h
@@ -117,11 +117,15 @@ extern DECLSPEC int SDLCALL SDL_ShowCursor(int toggle);
Button 1: Left mouse button
Button 2: Middle mouse button
Button 3: Right mouse button
+ Button 4: Mouse wheel up (may also be a real button)
+ Button 5: Mouse wheel down (may also be a real button)
*/
#define SDL_BUTTON(X) (SDL_PRESSED<<(X-1))
#define SDL_BUTTON_LEFT 1
#define SDL_BUTTON_MIDDLE 2
#define SDL_BUTTON_RIGHT 3
+#define SDL_BUTTON_WHEELUP 4
+#define SDL_BUTTON_WHEELDOWN 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)
diff --git a/src/video/wincommon/SDL_sysevents.c b/src/video/wincommon/SDL_sysevents.c
index 4bc1f9c67..dbd8065cc 100644
--- a/src/video/wincommon/SDL_sysevents.c
+++ b/src/video/wincommon/SDL_sysevents.c
@@ -370,9 +370,9 @@ LONG CALLBACK WinMessage(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
if ( move ) {
Uint8 button;
if ( move > 0 )
- button = 4;
+ button = SDL_BUTTON_WHEELUP;
else
- button = 5;
+ button = SDL_BUTTON_WHEELDOWN;
posted = SDL_PrivateMouseButton(
SDL_PRESSED, button, 0, 0);
posted |= SDL_PrivateMouseButton(