Discard button press events during save loading (bug #5619)

pull/3091/head
Andrei Kortunov 3 years ago
parent 62c7adc87b
commit e38063dcdb

@ -80,6 +80,7 @@
Bug #5603: Setting constant effect cast style doesn't correct effects view
Bug #5604: Only one valid NIF root node is loaded from a single file
Bug #5611: Usable items with "0 Uses" should be used only once
Bug #5619: Input events are queued during save loading
Bug #5622: Can't properly interact with the console when in pause menu
Bug #5627: Bookart not shown if it isn't followed by <BR> statement
Bug #5633: Damage Spells in effect before god mode is enabled continue to hurt the player character and can kill them

@ -52,9 +52,14 @@ InputWrapper::InputWrapper(SDL_Window* window, osg::ref_ptr<osgViewer::Viewer> v
if (windowEventsOnly)
{
// During loading, just handle window events, and keep others for later
// During loading, handle window events, discard button presses 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);
return;
}

Loading…
Cancel
Save