Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

SDL2: flush the event queue after a movie

fixes getting left over touch input
  • Loading branch information...
commit 5b11737b46b6e5aa9f9130d341edbc44528dd522 1 parent 0d0b7d7
@bradallred bradallred authored
Showing with 2 additions and 0 deletions.
  1. +2 −0  gemrb/plugins/SDLVideo/SDL20Video.cpp
View
2  gemrb/plugins/SDLVideo/SDL20Video.cpp
@@ -191,6 +191,8 @@ void SDL20VideoDriver::DestroyMovieScreen()
Uint32 format = SDL_PIXELFORMAT_ABGR8888;
//SDL_GetWindowPixelFormat(window);
screenTexture = SDL_CreateTexture(renderer, format, SDL_TEXTUREACCESS_STREAMING, width, height);
+ // destroy any events that took place during the movies
+ SDL_FlushEvents(SDL_FIRSTEVENT, SDL_LASTEVENT);
}
void SDL20VideoDriver::showFrame(unsigned char* buf, unsigned int bufw,
Please sign in to comment.
Something went wrong with that request. Please try again.