changeset 2711:62e7af9b2b67

Added missing X1/X2 button support
author Sam Lantinga <slouken@libsdl.org>
date Mon, 25 Aug 2008 06:58:34 +0000
parents 44e49d3fa6cf
children c4e697245676
files src/video/win32/SDL_win32events.c
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/video/win32/SDL_win32events.c	Mon Aug 25 06:33:00 2008 +0000
+++ b/src/video/win32/SDL_win32events.c	Mon Aug 25 06:58:34 2008 +0000
@@ -271,6 +271,16 @@
             } else if (flags & RI_MOUSE_BUTTON_3_UP) {
                 SDL_SendMouseButton(index, SDL_RELEASED, SDL_BUTTON_RIGHT);
             }
+            if (flags & RI_MOUSE_BUTTON_4_DOWN) {
+                SDL_SendMouseButton(index, SDL_PRESSED, SDL_BUTTON_X1);
+            } else if (flags & RI_MOUSE_BUTTON_4_UP) {
+                SDL_SendMouseButton(index, SDL_RELEASED, SDL_BUTTON_X1);
+            }
+            if (flags & RI_MOUSE_BUTTON_5_DOWN) {
+                SDL_SendMouseButton(index, SDL_PRESSED, SDL_BUTTON_X2);
+            } else if (flags & RI_MOUSE_BUTTON_5_UP) {
+                SDL_SendMouseButton(index, SDL_RELEASED, SDL_BUTTON_X2);
+            }
             if (flags & RI_MOUSE_WHEEL) {
                 if (raw->data.mouse.usButtonData != 0) {
                     SDL_SendMouseWheel(index, 0,