From: timoore Date: Wed, 12 Dec 2007 22:36:23 +0000 (+0000) Subject: Fix mouse warping for embedded osgviewer in SDL X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=3b26a3219c7f726ceb9ce7085b3d95817a3da422;p=flightgear.git Fix mouse warping for embedded osgviewer in SDL As in the GLUT implementation, let the FGManipulator drain its event queue. --- 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); }