From 40d2026267c72bacbf65ae7f3679361d60833247 Mon Sep 17 00:00:00 2001 From: Seungha Yang Date: Wed, 26 Jan 2022 02:46:49 +0900 Subject: [PATCH] gstplugin: Fix for UWP build SetThreadErrorMode() API is available on UWP but flag values are desktop API only. Since error dialogs don't exist on UWP, we don't need to suppress it Part-of: --- subprojects/gstreamer/gst/gstplugin.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/subprojects/gstreamer/gst/gstplugin.c b/subprojects/gstreamer/gst/gstplugin.c index 594999c..aa7d6d9 100644 --- a/subprojects/gstreamer/gst/gstplugin.c +++ b/subprojects/gstreamer/gst/gstplugin.c @@ -743,18 +743,19 @@ extract_symname (const char *filename) static char * get_better_module_load_error (const char *filename, const char *orig_err_msg) { - BOOL ret; + BOOL ret = 0; DWORD mode; wchar_t *wfilename; HMODULE handle; char *err_msg = NULL; wfilename = g_utf8_to_utf16 (filename, -1, NULL, NULL, NULL); - ret = SetThreadErrorMode (SEM_NOOPENFILEERRORBOX | SEM_FAILCRITICALERRORS, - &mode); #ifdef GST_WINAPI_ONLY_APP handle = LoadPackagedLibrary (wfilename, 0); #else + ret = SetThreadErrorMode (SEM_NOOPENFILEERRORBOX | SEM_FAILCRITICALERRORS, + &mode); + handle = LoadLibraryW (wfilename); #endif g_free (wfilename); -- 2.7.4