diff options
author | Alexey Yakovenko <waker@users.sourceforge.net> | 2013-11-07 22:23:13 +0100 |
---|---|---|
committer | Alexey Yakovenko <waker@users.sourceforge.net> | 2013-11-07 22:23:13 +0100 |
commit | bb4057a3cc7cb28829eb44cf05e3c325939ae3fe (patch) | |
tree | e69bbabdcf0b9b072c4ad047cd01ad67df163abb /main.c | |
parent | 0ee3ad44f2514289feb3d7079ff0afc3d7e79802 (diff) |
make sure that events sent after TERMINATE are propagated to plugins
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -531,14 +531,14 @@ player_mainloop (void) { uint32_t p2; int term = 0; while (messagepump_pop(&msg, &ctx, &p1, &p2) != -1) { - if (!term) { // when term is set to 1 -- it means we can't handle events, but we still need to process them to avoid memleaks - // broadcast to all plugins - DB_plugin_t **plugs = plug_get_list (); - for (int n = 0; plugs[n]; n++) { - if (plugs[n]->message) { - plugs[n]->message (msg, ctx, p1, p2); - } + // broadcast to all plugins + DB_plugin_t **plugs = plug_get_list (); + for (int n = 0; plugs[n]; n++) { + if (plugs[n]->message) { + plugs[n]->message (msg, ctx, p1, p2); } + } + if (!term) { DB_output_t *output = plug_get_output (); switch (msg) { case DB_EV_REINIT_SOUND: |