Break SDL_PeepEvents loop on error (bug #6890)

check_span
Alexei Kotov 2 years ago
parent 9a4df75f3c
commit bb2fa1cbfa

@ -140,6 +140,7 @@
Bug #6818: ess-importer doesn't exactly reproduce camera
Bug #6849: ImageButton texture is not scaled properly
Bug #6869: Hits queue stagger during swing animation
Bug #6890: SDL_PeepEvents errors are not handled
Bug #6895: Removing a negative number of items from a script, makes the script terminate with an error
Bug #6898: Accessing the Quick Inventory menu does not work while in menu mode
Bug #6901: Morrowind.exe soul gem usage discrepancy

@ -53,7 +53,7 @@ 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
while (SDL_PeepEvents(&evt, 1, SDL_GETEVENT, SDL_WINDOWEVENT, SDL_WINDOWEVENT))
while (SDL_PeepEvents(&evt, 1, SDL_GETEVENT, SDL_WINDOWEVENT, SDL_WINDOWEVENT) > 0)
handleWindowEvent(evt);
SDL_FlushEvent(SDL_KEYDOWN);

Loading…
Cancel
Save