1
0
Fork 0

Fix mouse warping for embedded osgviewer in SDL

As in the GLUT implementation, let the FGManipulator drain its event queue.
This commit is contained in:
timoore 2007-12-12 22:36:23 +00:00
parent 1ec9d615ff
commit 3b26a3219c

View file

@ -258,9 +258,7 @@ int fgGetKeyModifiers()
void fgWarpMouse(int x, int y) void fgWarpMouse(int x, int y)
{ {
SDL_Event e[10]; globals->get_renderer()->getManipulator()->setMouseWarped();
SDL_PumpEvents();
SDL_PeepEvents(e, 10, SDL_GETEVENT, SDL_MOUSEMOTIONMASK);
SDL_WarpMouse(x, y); SDL_WarpMouse(x, y);
} }