[WinRT] Wait for DispatcherQueueController shutdown.

This commit is contained in:
bruvzg
2026-04-17 11:35:26 +03:00
parent a8643700ce
commit bdc2651ea6
+9 -1
View File
@@ -132,7 +132,15 @@ bool WinRTUtils::create_queue() {
}
void WinRTUtils::destroy_queue() {
controller.ShutdownQueueAsync();
IAsyncAction action = controller.ShutdownQueueAsync();
while (action.Status() == AsyncStatus::Started) {
MSG msg = {};
while (PeekMessageW(&msg, nullptr, 0, 0, PM_REMOVE)) {
TranslateMessage(&msg);
DispatchMessageW(&msg);
}
}
ERR_FAIL_COND_MSG(action.Status() == AsyncStatus::Error, "DispatcherQueueController shutdown failed.");
}
bool WinRTUtils::try_show_onecore_emoji_picker() {