summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Gayot <duskcoder@gmail.com>2015-01-10 03:26:10 +0100
committerOlivier Gayot <duskcoder@gmail.com>2015-01-10 03:30:18 +0100
commit5ab5f72ba931e1d29a18a6b42e2cc2d73e291c4e (patch)
tree42ea1e5e939bfa8a7b818105e19867b238d6be88
parentf4ba62fdcf3940c0ad5b9f6e7b142bceb148c034 (diff)
drop events produced during sleeps
Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
-rw-r--r--jouer.c2
1 files changed, 2 insertions, 0 deletions
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);