From 3b26a3219c7f726ceb9ce7085b3d95817a3da422 Mon Sep 17 00:00:00 2001 From: timoore Date: Wed, 12 Dec 2007 22:36:23 +0000 Subject: [PATCH] Fix mouse warping for embedded osgviewer in SDL As in the GLUT implementation, let the FGManipulator drain its event queue. --- src/Main/fg_os_sdl.cxx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Main/fg_os_sdl.cxx b/src/Main/fg_os_sdl.cxx index 2c104c4ab..b3e970fff 100644 --- a/src/Main/fg_os_sdl.cxx +++ b/src/Main/fg_os_sdl.cxx @@ -258,9 +258,7 @@ int fgGetKeyModifiers() void fgWarpMouse(int x, int y) { - SDL_Event e[10]; - SDL_PumpEvents(); - SDL_PeepEvents(e, 10, SDL_GETEVENT, SDL_MOUSEMOTIONMASK); + globals->get_renderer()->getManipulator()->setMouseWarped(); SDL_WarpMouse(x, y); } -- 2.39.5