diff --git a/code/sdl/sdl_input.c b/code/sdl/sdl_input.c index 57e20e39..5dd141fd 100644 --- a/code/sdl/sdl_input.c +++ b/code/sdl/sdl_input.c @@ -756,10 +756,8 @@ static void IN_ProcessEvents( void ) case 1: b = K_MOUSE1; break; case 2: b = K_MOUSE3; break; case 3: b = K_MOUSE2; break; - case 4: b = K_MWHEELUP; break; - case 5: b = K_MWHEELDOWN; break; - case 6: b = K_MOUSE4; break; - case 7: b = K_MOUSE5; break; + case 4: b = K_MOUSE4; break; + case 5: b = K_MOUSE5; break; default: b = K_AUX1 + ( e.button.button - 8 ) % 16; break; } Com_QueueEvent( 0, SE_KEY, b, @@ -767,6 +765,13 @@ static void IN_ProcessEvents( void ) } break; + case SDL_MOUSEWHEEL: + if( e.wheel.y > 0 ) + Com_QueueEvent( 0, SE_KEY, K_MWHEELUP, qtrue, 0, NULL ); + else + Com_QueueEvent( 0, SE_KEY, K_MWHEELDOWN, qtrue, 0, NULL ); + break; + case SDL_QUIT: Cbuf_ExecuteText(EXEC_NOW, "quit Closed window\n"); break;