From 11c3bed74d0c2a0316302803b15176fe0f22e1a3 Mon Sep 17 00:00:00 2001 From: cmf028 Date: Fri, 20 Sep 2013 20:12:17 -0500 Subject: [PATCH] Send key up events for the mouse wheel Previous versions of SDL would send SDL_MOUSEBUTTONUP events for the mouse wheel immediately following the corresponding SDL_MOUSEBUTTONDOWN event --- code/sdl/sdl_input.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code/sdl/sdl_input.c b/code/sdl/sdl_input.c index 520d5e81..814550c1 100644 --- a/code/sdl/sdl_input.c +++ b/code/sdl/sdl_input.c @@ -807,9 +807,15 @@ static void IN_ProcessEvents( void ) case SDL_MOUSEWHEEL: if( e.wheel.y > 0 ) + { Com_QueueEvent( 0, SE_KEY, K_MWHEELUP, qtrue, 0, NULL ); + Com_QueueEvent( 0, SE_KEY, K_MWHEELUP, qfalse, 0, NULL ); + } else + { Com_QueueEvent( 0, SE_KEY, K_MWHEELDOWN, qtrue, 0, NULL ); + Com_QueueEvent( 0, SE_KEY, K_MWHEELDOWN, qfalse, 0, NULL ); + } break; case SDL_QUIT: