From 5ab5f72ba931e1d29a18a6b42e2cc2d73e291c4e Mon Sep 17 00:00:00 2001 From: Olivier Gayot Date: Sat, 10 Jan 2015 03:26:10 +0100 Subject: drop events produced during sleeps Signed-off-by: Olivier Gayot --- jouer.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'jouer.c') diff --git a/jouer.c b/jouer.c index 2a444e0..52a73d6 100644 --- a/jouer.c +++ b/jouer.c @@ -171,6 +171,7 @@ enum action_state_t select_target(struct action_params_t *params, const struct a update_selected_target(surfaces, positions, &target); SDL_Flip(surfaces->Pecran); + while (SDL_PollEvent(&event)); for (;;) { SDL_WaitEvent(&event); @@ -250,6 +251,7 @@ enum action_state_t dig_entry(const struct entry_t *entries, int cnt_entries, st update_list_entries(params->surfaces, params->positions, entries, cnt_entries, selection); + while (SDL_PollEvent(&event)); for (;;) { SDL_WaitEvent(&event); -- cgit v1.2.3