diff options
author | Olivier Gayot <duskcoder@gmail.com> | 2015-01-10 03:26:10 +0100 |
---|---|---|
committer | Olivier Gayot <duskcoder@gmail.com> | 2015-01-10 03:30:18 +0100 |
commit | 5ab5f72ba931e1d29a18a6b42e2cc2d73e291c4e (patch) | |
tree | 42ea1e5e939bfa8a7b818105e19867b238d6be88 | |
parent | f4ba62fdcf3940c0ad5b9f6e7b142bceb148c034 (diff) |
drop events produced during sleeps
Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
-rw-r--r-- | jouer.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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); |