Merge branch 'master' into 'bigpeepeventsenergy'

# Conflicts:
#   components/sdlutil/sdlinputwrapper.cpp
This commit is contained in:
psi29a 2022-08-01 07:55:51 +00:00
commit 04fcfcc79d
6 changed files with 62 additions and 7 deletions

View file

@ -52,13 +52,15 @@ InputWrapper::InputWrapper(SDL_Window* window, osg::ref_ptr<osgViewer::Viewer> v
if (windowEventsOnly)
{
// During loading, handle window events, discard button presses and keep others for later
// During loading, handle window events, discard button presses and mouse movement and keep others for later
while (SDL_PeepEvents(&evt, 1, SDL_GETEVENT, SDL_WINDOWEVENT, SDL_WINDOWEVENT) > 0)
handleWindowEvent(evt);
SDL_FlushEvent(SDL_KEYDOWN);
SDL_FlushEvent(SDL_CONTROLLERBUTTONDOWN);
SDL_FlushEvent(SDL_MOUSEBUTTONDOWN);
SDL_FlushEvent(SDL_MOUSEMOTION);
SDL_FlushEvent(SDL_MOUSEWHEEL);
return;
}