mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 21:32:45 +00:00
(SDL) Use SDL_PeepEvents instead of SDL_PollEvent
This commit is contained in:
parent
0813d7dba4
commit
ea82f6cff5
@ -299,16 +299,14 @@ error:
|
|||||||
static void check_window(sdl_video_t *vid)
|
static void check_window(sdl_video_t *vid)
|
||||||
{
|
{
|
||||||
SDL_Event event;
|
SDL_Event event;
|
||||||
while (SDL_PollEvent(&event))
|
|
||||||
{
|
|
||||||
switch (event.type)
|
|
||||||
{
|
|
||||||
case SDL_QUIT:
|
|
||||||
vid->quitting = true;
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
SDL_PumpEvents();
|
||||||
break;
|
while (SDL_PeepEvents(&event, 1, SDL_GETEVENT, SDL_QUITMASK))
|
||||||
|
{
|
||||||
|
if (event.type == SDL_QUIT)
|
||||||
|
{
|
||||||
|
vid->quitting = true;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user