]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
changed mouse button numbering to have MWHEELUP/MWHEELDOWN and then 4 5...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 1 Jan 2006 13:21:55 +0000 (13:21 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 1 Jan 2006 13:21:55 +0000 (13:21 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5886 d7cf8633-e32d-0410-b094-e92efae38249

vid_sdl.c

index e5c844e5362718c3aeb0ae943bc47e05716a77cb..1e6eed59be2b554f2f689d71e140ffc31e675e99 100644 (file)
--- a/vid_sdl.c
+++ b/vid_sdl.c
@@ -254,11 +254,13 @@ static int Sys_EventFilter( SDL_Event *event )
 #endif
 }
 
-static keynum_t buttonremap[16] =
+static keynum_t buttonremap[18] =
 {
        K_MOUSE1,
        K_MOUSE3,
        K_MOUSE2,
+       K_MWHEELUP,
+       K_MWHEELDOWN,
        K_MOUSE4,
        K_MOUSE5,
        K_MOUSE6,
@@ -297,11 +299,11 @@ void Sys_SendKeyEvents( void )
                                }
                                break;
                        case SDL_MOUSEBUTTONDOWN:
-                               if (event.button.button <= 16)
+                               if (event.button.button <= 18)
                                        Key_Event( buttonremap[event.button.button - 1], 0, true );
                                break;
                        case SDL_MOUSEBUTTONUP:
-                               if (event.button.button <= 16)
+                               if (event.button.button <= 18)
                                        Key_Event( buttonremap[event.button.button - 1], 0, false );
                                break;
                }