From: havoc Date: Sun, 1 Jan 2006 13:21:55 +0000 (+0000) Subject: changed mouse button numbering to have MWHEELUP/MWHEELDOWN and then 4 5... X-Git-Tag: xonotic-v0.1.0preview~4405 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3895fb3c013e84780f76ae3a2122556d84500660;p=xonotic%2Fdarkplaces.git changed mouse button numbering to have MWHEELUP/MWHEELDOWN and then 4 5... git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5886 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/vid_sdl.c b/vid_sdl.c index e5c844e5..1e6eed59 100644 --- 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; }