(SDL) Use SDL_PeepEvents instead of SDL_PollEvent

This commit is contained in:
Higor Eurípedes 2014-08-22 19:58:47 -03:00
parent 0813d7dba4
commit ea82f6cff5

View File

@ -299,16 +299,14 @@ error:
static void check_window(sdl_video_t *vid)
{
SDL_Event event;
while (SDL_PollEvent(&event))
{
switch (event.type)
{
case SDL_QUIT:
vid->quitting = true;
break;
default:
break;
SDL_PumpEvents();
while (SDL_PeepEvents(&event, 1, SDL_GETEVENT, SDL_QUITMASK))
{
if (event.type == SDL_QUIT)
{
vid->quitting = true;
break;
}
}
}