diff src/video/win32/SDL_win32events.c @ 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 0e2b65f32298
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,