diff options
author | Brecht Van Lommel <brecht> | 2022-11-03 17:46:41 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2022-11-03 17:46:44 +0300 |
commit | e449bf350c94bebd7a198b3327860da89bd490d8 (patch) | |
tree | 252e5d138f2b36e1da5ba9ae9d80807524b814d3 /intern/wayland_dynload/intern/wayland_dynload_utils.c | |
parent | 09b9e1e95ee4a5cea5297d06af26385b73856aeb (diff) |
Fix Wayland warning on startup when running X11
On Ubuntu 20.04 running X11, there was this message on every Blender startup:
Unable to find 'wl_proxy_marshal_flags' in 'libwayland-client.so.0'.
The reason is that we build against Wayland protocols 1.21, which in turns requires
Wayland on the distribution to be 1.21+, which is not the case on Ubuntu 20.04.
This simply silences the warning. An improvement would be to explain the user that
their Wayland version is too old when neither X11 or Wayland can be found. Though
that's not trivial and a situation with old Wayland and no XWayland seems unlikely
to happen in practice.
Differential Revision: https://developer.blender.org/D16266
Diffstat (limited to 'intern/wayland_dynload/intern/wayland_dynload_utils.c')
-rw-r--r-- | intern/wayland_dynload/intern/wayland_dynload_utils.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/intern/wayland_dynload/intern/wayland_dynload_utils.c b/intern/wayland_dynload/intern/wayland_dynload_utils.c index 743dac14eec..666de20c5d3 100644 --- a/intern/wayland_dynload/intern/wayland_dynload_utils.c +++ b/intern/wayland_dynload/intern/wayland_dynload_utils.c @@ -30,11 +30,16 @@ DynamicLibrary dynamic_library_open_array_with_error(const char **paths, return lib; } -void *dynamic_library_find_with_error(DynamicLibrary lib, const char *symbol, const char *path_lib) +void *dynamic_library_find_with_error(DynamicLibrary lib, + const char *symbol, + const char *path_lib, + const bool verbose) { void *symbol_var = dynamic_library_find(lib, symbol); if (symbol_var == NULL) { - fprintf(stderr, "Unable to find '%s' in '%s'.\n", symbol, path_lib); + if (verbose) { + fprintf(stderr, "Unable to find '%s' in '%s'.\n", symbol, path_lib); + } } return symbol_var; } |