From 791541a3fb75203c6f3da5956d02940ab819ad55 Mon Sep 17 00:00:00 2001 From: Valentin Radu Date: Wed, 10 Nov 2021 21:21:27 +0200 Subject: [PATCH] Settings monitor calls all callbacks when multiple registry entries are signaled at the same time --- ExplorerPatcher/SettingsMonitor.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ExplorerPatcher/SettingsMonitor.c b/ExplorerPatcher/SettingsMonitor.c index 668dddf..0c477aa 100644 --- a/ExplorerPatcher/SettingsMonitor.c +++ b/ExplorerPatcher/SettingsMonitor.c @@ -62,6 +62,13 @@ DWORD WINAPI MonitorSettings(SettingsChangeParameters* params) { bShouldExit = TRUE; } + for (unsigned int j = 0; j < params->size; ++j) + { + if (WaitForSingleObject(handles[j], 0) == WAIT_OBJECT_0) + { + params->settings[j].callback(params->settings[j].data); + } + } } free(handles); for (unsigned int i = 0; i < params->size; ++i)