Add a limit to all Win32 message loops #28

This works around Waves plugins causing an infinite message loop. Since
we run the loop 30 times per second anyways splitting the loop up into
chunks of 20 shouldn't be an issue.
This commit is contained in:
Robbert van der Helm
2020-08-14 11:36:55 +02:00
parent c64fdb21d7
commit becb73928e
5 changed files with 46 additions and 23 deletions
+11
View File
@@ -35,6 +35,17 @@
#include "../common/configuration.h"
#include "utils.h"
/**
* The maximum number of Win32 messages to handle per message loop. This is
* needed because otherwise some plugins can run into an infinite loop. I've
* observed this with:
*
* - Waves plugins
* - Melda plugins when having multiple editor windows open within a single
* plugin group
*/
constexpr int max_win32_messages = 20;
/**
* Used to store the maximum width and height of a screen.
*/