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:
parent
1ec9d615ff
commit
3b26a3219c
1 changed files with 1 additions and 3 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue