mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-28 21:07:59 +03:00
Prevent mouse movement events from being queued in loading screens (bug #4374)
This commit is contained in:
parent
9a4df75f3c
commit
f9fdcfe4a7
2 changed files with 4 additions and 1 deletions
|
@ -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))
|
||||
handleWindowEvent(evt);
|
||||
|
||||
SDL_FlushEvent(SDL_KEYDOWN);
|
||||
SDL_FlushEvent(SDL_CONTROLLERBUTTONDOWN);
|
||||
SDL_FlushEvent(SDL_MOUSEBUTTONDOWN);
|
||||
SDL_FlushEvent(SDL_MOUSEMOTION);
|
||||
SDL_FlushEvent(SDL_MOUSEWHEEL);
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue