aboutsummaryrefslogtreecommitdiffstats
path: root/code/sdl
diff options
context:
space:
mode:
authorludwig <ludwig@edf5b092-35ff-0310-97b2-ce42778d08ea>2008-05-06 20:24:34 +0000
committerludwig <ludwig@edf5b092-35ff-0310-97b2-ce42778d08ea>2008-05-06 20:24:34 +0000
commitea58233e3370adf79d2830003b9c736716622b9b (patch)
tree4d8f48c1743d00391a60edea2924c5972ba11524 /code/sdl
parent212a4ed7d0837952cfd56ca00ec3f71cf531952f (diff)
downloadioquake3-aero-ea58233e3370adf79d2830003b9c736716622b9b.tar.gz
ioquake3-aero-ea58233e3370adf79d2830003b9c736716622b9b.zip
combine all mouse events received in one frame
git-svn-id: svn://svn.icculus.org/quake3/trunk@1341 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/sdl')
-rw-r--r--code/sdl/sdl_input.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/code/sdl/sdl_input.c b/code/sdl/sdl_input.c
index d285ccb..bce410a 100644
--- a/code/sdl/sdl_input.c
+++ b/code/sdl/sdl_input.c
@@ -651,6 +651,7 @@ static void IN_ProcessEvents( void )
SDL_Event e;
const char *p = NULL;
int key = 0;
+ int mx = 0, my = 0;
if( !SDL_WasInit( SDL_INIT_VIDEO ) )
return;
@@ -691,7 +692,10 @@ static void IN_ProcessEvents( void )
case SDL_MOUSEMOTION:
if (mouseActive)
- Com_QueueEvent( 0, SE_MOUSE, e.motion.xrel, e.motion.yrel, 0, NULL );
+ {
+ mx += e.motion.xrel;
+ my += e.motion.yrel;
+ }
break;
case SDL_MOUSEBUTTONDOWN:
@@ -722,6 +726,9 @@ static void IN_ProcessEvents( void )
break;
}
}
+
+ if(mx || my)
+ Com_QueueEvent( 0, SE_MOUSE, mx, my, 0, NULL );
}
/*