From 3895fb3c013e84780f76ae3a2122556d84500660 Mon Sep 17 00:00:00 2001 From: havoc Date: Sun, 1 Jan 2006 13:21:55 +0000 Subject: [PATCH] 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 --- vid_sdl.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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; } -- 2.39.2