Permalink
Browse files

SDL2: flush the event queue after a movie

fixes getting left over touch input
  • Loading branch information...
1 parent 0d0b7d7 commit 5b11737b46b6e5aa9f9130d341edbc44528dd522 @bradallred bradallred committed Dec 27, 2013
Showing with 2 additions and 0 deletions.
  1. +2 −0 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,

0 comments on commit 5b11737

Please sign in to comment.