Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/GStreamer/gstreamer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeungha Yang <seungha@centricular.com>2022-01-25 20:46:49 +0300
committerTim-Philipp Müller <tim@centricular.com>2022-01-28 13:17:07 +0300
commite3de025a0333394e40cd690f55ef8f0b37390f0c (patch)
tree3db99ba2d15e77757686ea3f4c7e28b1038c3edb
parent912a39ba6e2ab9508c79e7cdd887d3b9f6039c65 (diff)
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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1569>
-rw-r--r--gst/gstplugin.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gst/gstplugin.c b/gst/gstplugin.c
index 2934c6982c..954b898e9f 100644
--- a/gst/gstplugin.c
+++ b/gst/gstplugin.c
@@ -746,18 +746,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);