call al_unref_user_event in event loop on user events

This commit is contained in:
Sebastian Krzyszkowiak 2017-11-26 10:39:13 +01:00
parent 29f9484a6b
commit 7c94d31d66
No known key found for this signature in database
GPG key ID: E8F235CF3BDBC3FF

View file

@ -239,6 +239,10 @@ static inline bool MainloopEvents(struct Game* game) {
EventGamestates(game, &ev);
if (ALLEGRO_EVENT_TYPE_IS_USER(ev.type)) {
al_unref_user_event(&ev.user);
}
} while (!al_is_event_queue_empty(game->_priv.event_queue));
return true;
}