From bb4057a3cc7cb28829eb44cf05e3c325939ae3fe Mon Sep 17 00:00:00 2001 From: Alexey Yakovenko Date: Thu, 7 Nov 2013 22:23:13 +0100 Subject: make sure that events sent after TERMINATE are propagated to plugins --- main.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index b1a5cd8c..d5a7b83d 100644 --- a/main.c +++ b/main.c @@ -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: -- cgit v1.2.3