From bf3fbb7bdfdbda3f0ce6a9e37093437f3e078bb6 Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Wed, 8 Apr 2020 09:15:39 +1000 Subject: [PATCH] Rebase against 38e95ed2227dd3f0fc3d1394c884265d43e3b283 --- ...er-Add-commandline-option-check-libs.patch | 313 ------------------ ...rary-paths-for-check-libs-on-Mac-OS-.patch | 60 ---- ...-BCryptSecretAgreement-with-libgcryp.patch | 8 +- ...plementation-of-MPEG2-decoder-using-.patch | 56 ++-- .../0009-dxva2-Add-DRM-mode-for-vaapi.patch | 40 +-- .../0003-nvcuda-First-implementation.patch | 6 +- ...ment-new-functions-added-in-CUDA-6.5.patch | 4 +- ...Search-for-dylib-library-on-Mac-OS-X.patch | 4 +- .../0001-nvcuvid-First-implementation.patch | 6 +- ...001-nvencodeapi-First-implementation.patch | 6 +- ...debian-specific-paths-to-native-libr.patch | 4 +- ...d-OpenCL-1.0-function-pointer-loader.patch | 10 +- patches/patchinstall.sh | 8 +- ...-track-of-pointer-and-device-button-.patch | 32 +- ...nitial-implementation-of-GTK-backend.patch | 14 +- ...U-flags-before-calling-GTK3-function.patch | 2 +- ...a-default-vulkan-driver-if-one-not-f.patch | 16 +- .../0001-wpcap-Load-libpcap-dynamically.patch | 6 +- 18 files changed, 109 insertions(+), 486 deletions(-) delete mode 100644 patches/Staging/0004-loader-Add-commandline-option-check-libs.patch delete mode 100644 patches/Staging/0005-loader-Print-library-paths-for-check-libs-on-Mac-OS-.patch diff --git a/patches/Staging/0004-loader-Add-commandline-option-check-libs.patch b/patches/Staging/0004-loader-Add-commandline-option-check-libs.patch deleted file mode 100644 index f881f614..00000000 --- a/patches/Staging/0004-loader-Add-commandline-option-check-libs.patch +++ /dev/null @@ -1,313 +0,0 @@ -From f600092be294a5bb42e42abcd20cc784d1ca5eab Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Michael=20M=C3=BCller?= -Date: Wed, 28 May 2014 19:50:51 +0200 -Subject: [PATCH] loader: Add commandline option --check-libs. - ---- - include/wine/library.h | 2 + - libs/wine/config.c | 124 +++++++++++++++++++++++++++++++++++++++++ - libs/wine/loader.c | 36 ++++++++++++ - libs/wine/wine.map | 2 + - loader/main.c | 50 ++++++++++++++++- - 5 files changed, 213 insertions(+), 1 deletion(-) - -diff --git a/include/wine/library.h b/include/wine/library.h -index 1f992da6062..60d6b525c75 100644 ---- a/include/wine/library.h -+++ b/include/wine/library.h -@@ -44,6 +44,7 @@ extern "C" { - extern const char *wine_get_build_dir(void); - extern const char *wine_get_config_dir(void); - extern const char *wine_get_data_dir(void); -+extern const char **wine_get_libs(void); - extern const char *wine_get_server_dir(void); - extern const char *wine_get_user_name(void); - extern const char *wine_get_version(void); -@@ -56,6 +57,7 @@ extern void wine_exec_wine_binary( const char *name, char **argv, const char *en - - typedef void (*load_dll_callback_t)( void *, const char * ); - -+extern int wine_dladdr( void *addr, void *info, char *error, size_t errorsize ); - extern void *wine_dlopen( const char *filename, int flag, char *error, size_t errorsize ); - extern void *wine_dlsym( void *handle, const char *symbol, char *error, size_t errorsize ); - extern int wine_dlclose( void *handle, char *error, size_t errorsize ); -diff --git a/libs/wine/config.c b/libs/wine/config.c -index 5b66c063db6..e0988513e14 100644 ---- a/libs/wine/config.c -+++ b/libs/wine/config.c -@@ -470,6 +470,130 @@ const char *wine_get_build_dir(void) - return build_dir; - } - -+const char *wine_libs[] = { -+#ifdef SONAME_LIBCAIRO -+ SONAME_LIBCAIRO, -+#endif -+#ifdef SONAME_LIBCAPI20 -+ SONAME_LIBCAPI20, -+#endif -+#ifdef SONAME_LIBCUPS -+ SONAME_LIBCUPS, -+#endif -+#ifdef SONAME_LIBCURSES -+ SONAME_LIBCURSES, -+#endif -+#ifdef SONAME_LIBDBUS_1 -+ SONAME_LIBDBUS_1, -+#endif -+#ifdef SONAME_LIBFONTCONFIG -+ SONAME_LIBFONTCONFIG, -+#endif -+#ifdef SONAME_LIBFREETYPE -+ SONAME_LIBFREETYPE, -+#endif -+#ifdef SONAME_LIBGL -+ SONAME_LIBGL, -+#endif -+#ifdef SONAME_LIBGNUTLS -+ SONAME_LIBGNUTLS, -+#endif -+#ifdef SONAME_LIBGOBJECT_2_0 -+ SONAME_LIBGOBJECT_2_0, -+#endif -+#ifdef SONAME_LIBGSM -+ SONAME_LIBGSM, -+#endif -+#ifdef SONAME_LIBGTK_3 -+ SONAME_LIBGTK_3, -+#endif -+#ifdef SONAME_LIBHAL -+ SONAME_LIBHAL, -+#endif -+#ifdef SONAME_LIBJPEG -+ SONAME_LIBJPEG, -+#endif -+#ifdef SONAME_LIBNCURSES -+ SONAME_LIBNCURSES, -+#endif -+#ifdef SONAME_LIBNETAPI -+ SONAME_LIBNETAPI, -+#endif -+#ifdef SONAME_LIBODBC -+ SONAME_LIBODBC, -+#endif -+#ifdef SONAME_LIBOSMESA -+ SONAME_LIBOSMESA, -+#endif -+#ifdef SONAME_LIBPCAP -+ SONAME_LIBPCAP, -+#endif -+#ifdef SONAME_LIBPNG -+ SONAME_LIBPNG, -+#endif -+#ifdef SONAME_LIBSANE -+ SONAME_LIBSANE, -+#endif -+#ifdef SONAME_LIBTIFF -+ SONAME_LIBTIFF, -+#endif -+#ifdef SONAME_LIBTXC_DXTN -+ SONAME_LIBTXC_DXTN, -+#endif -+#ifdef SONAME_LIBV4L1 -+ SONAME_LIBV4L1, -+#endif -+#ifdef SONAME_LIBVA -+ SONAME_LIBVA, -+#endif -+#ifdef SONAME_LIBVA_DRM -+ SONAME_LIBVA_DRM, -+#endif -+#ifdef SONAME_LIBVA_X11 -+ SONAME_LIBVA_X11, -+#endif -+#ifdef SONAME_LIBX11 -+ SONAME_LIBX11, -+#endif -+#ifdef SONAME_LIBX11_XCB -+ SONAME_LIBX11_XCB, -+#endif -+#ifdef SONAME_LIBXCOMPOSITE -+ SONAME_LIBXCOMPOSITE, -+#endif -+#ifdef SONAME_LIBXCURSOR -+ SONAME_LIBXCURSOR, -+#endif -+#ifdef SONAME_LIBXEXT -+ SONAME_LIBXEXT, -+#endif -+#ifdef SONAME_LIBXI -+ SONAME_LIBXI, -+#endif -+#ifdef SONAME_LIBXINERAMA -+ SONAME_LIBXINERAMA, -+#endif -+#ifdef SONAME_LIBXRANDR -+ SONAME_LIBXRANDR, -+#endif -+#ifdef SONAME_LIBXRENDER -+ SONAME_LIBXRENDER, -+#endif -+#ifdef SONAME_LIBXSLT -+ SONAME_LIBXSLT, -+#endif -+#ifdef SONAME_LIBXXF86VM -+ SONAME_LIBXXF86VM, -+#endif -+ NULL -+}; -+ -+/* return the list of shared libs used by wine */ -+const char **wine_get_libs(void) -+{ -+ return &wine_libs[0]; -+} -+ - /* return the full name of the server directory (the one containing the socket) */ - const char *wine_get_server_dir(void) - { -diff --git a/libs/wine/loader.c b/libs/wine/loader.c -index 53e33c496a9..eb7dfb59fb8 100644 ---- a/libs/wine/loader.c -+++ b/libs/wine/loader.c -@@ -1073,6 +1073,42 @@ void *wine_dlopen( const char *filename, int flag, char *error, size_t errorsize - return ret; - } - -+/*********************************************************************** -+ * wine_dladdr -+ */ -+int wine_dladdr( void *addr, void *info, char *error, size_t errorsize ) -+{ -+#ifdef HAVE_DLADDR -+ int ret; -+ const char *s; -+ dlerror(); dlerror(); -+ ret = dladdr( addr, (Dl_info *)info ); -+ s = dlerror(); -+ if (error && errorsize) -+ { -+ if (s) -+ { -+ size_t len = strlen(s); -+ if (len >= errorsize) len = errorsize - 1; -+ memcpy( error, s, len ); -+ error[len] = 0; -+ } -+ else error[0] = 0; -+ } -+ dlerror(); -+ return ret; -+#else -+ if (error) -+ { -+ static const char msg[] = "dladdr interface not detected by configure"; -+ size_t len = min( errorsize, sizeof(msg) ); -+ memcpy( error, msg, len ); -+ error[len - 1] = 0; -+ } -+ return 0; -+#endif -+} -+ - /*********************************************************************** - * wine_dlsym - */ -diff --git a/libs/wine/wine.map b/libs/wine/wine.map -index a7359ee7872..9c4c86dde4d 100644 ---- a/libs/wine/wine.map -+++ b/libs/wine/wine.map -@@ -9,6 +9,7 @@ WINE_1.0 - wine_anon_mmap; - wine_casemap_lower; - wine_casemap_upper; -+ wine_dladdr; - wine_dlclose; - wine_dll_enum_load_path; - wine_dll_set_callback; -@@ -19,6 +20,7 @@ WINE_1.0 - wine_get_build_id; - wine_get_config_dir; - wine_get_data_dir; -+ wine_get_libs; - wine_get_server_dir; - wine_get_user_name; - wine_get_version; -diff --git a/loader/main.c b/loader/main.c -index d97d6b28bf8..49dc996e354 100644 ---- a/loader/main.c -+++ b/loader/main.c -@@ -36,6 +36,12 @@ - #ifdef HAVE_UNISTD_H - # include - #endif -+#ifdef HAVE_DLADDR -+# include -+#endif -+#ifdef HAVE_LINK_H -+# include -+#endif - - #include "wine/library.h" - #include "main.h" -@@ -54,7 +60,8 @@ static void check_command_line( int argc, char *argv[] ) - "Usage: wine PROGRAM [ARGUMENTS...] Run the specified program\n" - " wine --help Display this help and exit\n" - " wine --version Output version information and exit\n" -- " wine --patches Output patch information and exit"; -+ " wine --patches Output patch information and exit\n" -+ " wine --check-libs Checks if shared libs are installed"; - - if (argc <= 1) - { -@@ -110,6 +117,47 @@ static void check_command_line( int argc, char *argv[] ) - - exit(0); - } -+ if (!strcmp( argv[1], "--check-libs" )) -+ { -+ void* lib_handle; -+ int ret = 0; -+ const char **wine_libs = wine_get_libs(); -+ -+ for(; *wine_libs; wine_libs++) -+ { -+ lib_handle = wine_dlopen( *wine_libs, RTLD_NOW, NULL, 0 ); -+ if (lib_handle) -+ { -+ #ifdef HAVE_DLADDR -+ Dl_info libinfo; -+ void* symbol; -+ -+ #ifdef HAVE_LINK_H -+ struct link_map *lm = (struct link_map *)lib_handle; -+ symbol = (void *)lm->l_addr; -+ #else -+ symbol = wine_dlsym( lib_handle, "_init", NULL, 0 ); -+ #endif -+ if (symbol && wine_dladdr( symbol, &libinfo, NULL, 0 )) -+ { -+ printf( "%s: %s\n", *wine_libs, libinfo.dli_fname ); -+ } -+ else -+ #endif -+ { -+ printf( "%s: found\n", *wine_libs ); -+ } -+ wine_dlclose( lib_handle, NULL, 0 ); -+ } -+ else -+ { -+ printf( "%s: missing\n", *wine_libs ); -+ ret = 1; -+ } -+ } -+ -+ exit(ret); -+ } - } - - --- -2.25.1 - diff --git a/patches/Staging/0005-loader-Print-library-paths-for-check-libs-on-Mac-OS-.patch b/patches/Staging/0005-loader-Print-library-paths-for-check-libs-on-Mac-OS-.patch deleted file mode 100644 index e1cf9a37..00000000 --- a/patches/Staging/0005-loader-Print-library-paths-for-check-libs-on-Mac-OS-.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 07ca5e888c3265c57c88ef1758e6c47fbea4fb07 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Michael=20M=C3=BCller?= -Date: Sat, 27 Jun 2015 19:28:51 +0200 -Subject: loader: Print library paths for --check-libs on Mac OS X. - ---- - loader/main.c | 30 +++++++++++++++++++++++++++++- - 1 file changed, 29 insertions(+), 1 deletion(-) - -diff --git a/loader/main.c b/loader/main.c -index a2dc40c51c..1642fb0965 100644 ---- a/loader/main.c -+++ b/loader/main.c -@@ -50,6 +50,30 @@ - /* the preloader will set this variable */ - const struct wine_preload_info *wine_main_preload_info = NULL; - -+#ifdef __APPLE__ -+#include -+ -+static const char *get_macho_library_path( const char *libname ) -+{ -+ unsigned int path_len, libname_len = strlen( libname ); -+ uint32_t i, count = _dyld_image_count(); -+ -+ for (i = 0; i < count; i++) -+ { -+ const char *path = _dyld_get_image_name( i ); -+ if (!path) continue; -+ -+ path_len = strlen( path ); -+ if (path_len < libname_len + 1) continue; -+ if (path[path_len - libname_len - 1] != '/') continue; -+ if (strcmp( path + path_len - libname_len, libname )) continue; -+ -+ return path; -+ } -+ return NULL; -+} -+#endif -+ - /*********************************************************************** - * check_command_line - * -@@ -146,7 +170,11 @@ static void check_command_line( int argc, char *argv[] ) - else - #endif - { -- printf( "%s: found\n", *wine_libs ); -+ const char *path = NULL; -+ #ifdef __APPLE__ -+ path = get_macho_library_path( *wine_libs ); -+ #endif -+ printf( "%s: %s\n", *wine_libs, path ? path : "found"); - } - wine_dlclose( lib_handle, NULL, 0 ); - } --- -2.14.1 - diff --git a/patches/bcrypt-ECDHSecretAgreement/0001-bcrypt-Implement-BCryptSecretAgreement-with-libgcryp.patch b/patches/bcrypt-ECDHSecretAgreement/0001-bcrypt-Implement-BCryptSecretAgreement-with-libgcryp.patch index 8d3f58c7..cdf8aa90 100644 --- a/patches/bcrypt-ECDHSecretAgreement/0001-bcrypt-Implement-BCryptSecretAgreement-with-libgcryp.patch +++ b/patches/bcrypt-ECDHSecretAgreement/0001-bcrypt-Implement-BCryptSecretAgreement-with-libgcryp.patch @@ -285,14 +285,14 @@ index 00000000000..d7ed6eeddf3 + +BOOL gcrypt_initialize(void) +{ -+ if (!(libgcrypt_handle = wine_dlopen( SONAME_LIBGCRYPT, RTLD_NOW, NULL, 0 ))) ++ if (!(libgcrypt_handle = dlopen( SONAME_LIBGCRYPT, RTLD_NOW))) + { + ERR_(winediag)( "failed to load libgcrypt, no support for diffie hellman key exchange\n" ); + return FALSE; + } + +#define LOAD_FUNCPTR(f) \ -+ if (!(p##f = wine_dlsym( libgcrypt_handle, #f, NULL, 0 ))) \ ++ if (!(p##f = dlsym( libgcrypt_handle, #f))) \ + { \ + ERR( "failed to load %s\n", #f ); \ + goto fail; \ @@ -314,7 +314,7 @@ index 00000000000..d7ed6eeddf3 + return TRUE; + +fail: -+ wine_dlclose( libgcrypt_handle, NULL, 0 ); ++ dlclose( libgcrypt_handle); + libgcrypt_handle = NULL; + return FALSE; +} @@ -322,7 +322,7 @@ index 00000000000..d7ed6eeddf3 + +void gcrypt_uninitialize(void) +{ -+ wine_dlclose( libgcrypt_handle, NULL, 0 ); ++ dlclose( libgcrypt_handle); + libgcrypt_handle = NULL; +} + diff --git a/patches/dxva2-Video_Decoder/0007-dxva2-Initial-implementation-of-MPEG2-decoder-using-.patch b/patches/dxva2-Video_Decoder/0007-dxva2-Initial-implementation-of-MPEG2-decoder-using-.patch index 8fe9cbcb..3c521cb7 100644 --- a/patches/dxva2-Video_Decoder/0007-dxva2-Initial-implementation-of-MPEG2-decoder-using-.patch +++ b/patches/dxva2-Video_Decoder/0007-dxva2-Initial-implementation-of-MPEG2-decoder-using-.patch @@ -1,4 +1,4 @@ -From 95a95d09125707b24f8728c545c7f5b706bafe1c Mon Sep 17 00:00:00 2001 +From a667953fb14e6061418e42e77a2bf494121cc2b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Sun, 22 Feb 2015 01:25:20 +0100 Subject: [PATCH] dxva2: Initial implementation of MPEG2 decoder using vaapi @@ -22,19 +22,19 @@ Subject: [PATCH] dxva2: Initial implementation of MPEG2 decoder using vaapi create mode 100644 dlls/dxva2/vaapi.c diff --git a/configure.ac b/configure.ac -index 39cef46e7..bb89c7ee0 100644 +index 3766908bd62..13584352f3e 100644 --- a/configure.ac +++ b/configure.ac -@@ -111,6 +111,8 @@ AC_ARG_WITH(xslt, AS_HELP_STRING([--without-xslt],[do not use XSLT])) +@@ -112,6 +112,8 @@ AC_ARG_WITH(xshm, AS_HELP_STRING([--without-xshm],[do not use XShm (shared + AC_ARG_WITH(xslt, AS_HELP_STRING([--without-xslt],[do not use XSLT])) AC_ARG_WITH(xxf86vm, AS_HELP_STRING([--without-xxf86vm],[do not use XFree video mode extension]), [if test "x$withval" = "xno"; then ac_cv_header_X11_extensions_xf86vmode_h=no; ac_cv_header_X11_extensions_xf86vmproto_h=no; fi]) - AC_ARG_WITH(zlib, AS_HELP_STRING([--without-zlib],[do not use Zlib (data compression)])) +AC_ARG_WITH(va, AS_HELP_STRING([--without-va],[do not use VA (GPU video acceleration)]), + [if test "x$withval" = "xno"; then ac_cv_header_va_va_x11_h=no; fi]) AC_ARG_WITH(wine-tools,AS_HELP_STRING([--with-wine-tools=DIR],[use Wine tools from directory DIR])) AC_ARG_WITH(wine64, AS_HELP_STRING([--with-wine64=DIR],[use the 64-bit Wine in DIR for a Wow64 build])) -@@ -1296,6 +1298,20 @@ This probably prevents linking to OpenGL. Try deleting the file and restarting c +@@ -1319,6 +1321,20 @@ This probably prevents linking to OpenGL. Try deleting the file and restarting c WINE_WARNING_WITH(opengl,[test -n "$opengl_msg"],[$opengl_msg OpenGL and Direct3D won't be supported.]) @@ -56,7 +56,7 @@ index 39cef46e7..bb89c7ee0 100644 else X_CFLAGS="" diff --git a/dlls/dxva2/Makefile.in b/dlls/dxva2/Makefile.in -index e4c90b523..b42cfae52 100644 +index e4c90b5231e..b42cfae525e 100644 --- a/dlls/dxva2/Makefile.in +++ b/dlls/dxva2/Makefile.in @@ -1,10 +1,16 @@ @@ -81,7 +81,7 @@ index e4c90b523..b42cfae52 100644 + videoservices.c diff --git a/dlls/dxva2/backend.idl b/dlls/dxva2/backend.idl new file mode 100644 -index 000000000..8d488351f +index 00000000000..8d488351ff2 --- /dev/null +++ b/dlls/dxva2/backend.idl @@ -0,0 +1,96 @@ @@ -182,7 +182,7 @@ index 000000000..8d488351f + [out] IWineVideoDecoder **decoder); +} diff --git a/dlls/dxva2/dxva2_private.h b/dlls/dxva2/dxva2_private.h -index f0068b688..f51863739 100644 +index f0068b68891..f51863739b0 100644 --- a/dlls/dxva2/dxva2_private.h +++ b/dlls/dxva2/dxva2_private.h @@ -1,5 +1,5 @@ @@ -317,7 +317,7 @@ index f0068b688..f51863739 100644 +#endif /* HAVE_VAAPI */ diff --git a/dlls/dxva2/genericdecoder.c b/dlls/dxva2/genericdecoder.c new file mode 100644 -index 000000000..3903d6b0b +index 00000000000..3903d6b0b46 --- /dev/null +++ b/dlls/dxva2/genericdecoder.c @@ -0,0 +1,432 @@ @@ -754,7 +754,7 @@ index 000000000..3903d6b0b + return S_OK; +} diff --git a/dlls/dxva2/main.c b/dlls/dxva2/main.c -index 0382b5fb0..3006f175b 100644 +index 0382b5fb00a..3006f175b7f 100644 --- a/dlls/dxva2/main.c +++ b/dlls/dxva2/main.c @@ -32,6 +32,8 @@ @@ -848,7 +848,7 @@ index 0382b5fb0..3006f175b 100644 return TRUE; diff --git a/dlls/dxva2/tests/dxva2.c b/dlls/dxva2/tests/dxva2.c -index dcbb990ee..c28be4d8e 100644 +index dcbb990ee5c..c28be4d8e3c 100644 --- a/dlls/dxva2/tests/dxva2.c +++ b/dlls/dxva2/tests/dxva2.c @@ -1,7 +1,7 @@ @@ -929,7 +929,7 @@ index dcbb990ee..c28be4d8e 100644 IDirectXVideoDecoderService_Release(service); diff --git a/dlls/dxva2/vaapi-mpeg2.c b/dlls/dxva2/vaapi-mpeg2.c new file mode 100644 -index 000000000..7b7f61db7 +index 00000000000..7b7f61db755 --- /dev/null +++ b/dlls/dxva2/vaapi-mpeg2.c @@ -0,0 +1,753 @@ @@ -1688,7 +1688,7 @@ index 000000000..7b7f61db7 +#endif /* HAVE_VAAPI */ diff --git a/dlls/dxva2/vaapi.c b/dlls/dxva2/vaapi.c new file mode 100644 -index 000000000..e2a64065e +index 00000000000..e2a64065e16 --- /dev/null +++ b/dlls/dxva2/vaapi.c @@ -0,0 +1,767 @@ @@ -1764,7 +1764,7 @@ index 000000000..e2a64065e +#undef MAKE_FUNCPTR + +#define LOAD_FUNCPTR(f) \ -+ if(!(p##f = wine_dlsym(handle, #f, NULL, 0))) \ ++ if(!(p##f = dlsym(handle, #f))) \ + { \ + WARN("Can't find symbol %s.\n", #f); \ + goto error; \ @@ -1772,7 +1772,7 @@ index 000000000..e2a64065e + +static void *load_libva( void ) +{ -+ void *handle = wine_dlopen(SONAME_LIBVA, RTLD_NOW, NULL, 0); ++ void *handle = dlopen(SONAME_LIBVA, RTLD_NOW); + if (!handle) + { + FIXME("Wine cannot find the %s library.\n", SONAME_LIBVA); @@ -1808,13 +1808,13 @@ index 000000000..e2a64065e + return handle; + +error: -+ wine_dlclose(handle, NULL, 0); ++ dlclose(handle); + return NULL; +} + +static void *load_libva_x11( void ) +{ -+ void *handle = wine_dlopen(SONAME_LIBVA_X11, RTLD_NOW, NULL, 0); ++ void *handle = dlopen(SONAME_LIBVA_X11, RTLD_NOW); + if (!handle) + { + FIXME("Wine cannot find the %s library.\n", SONAME_LIBVA_X11); @@ -1825,13 +1825,13 @@ index 000000000..e2a64065e + return handle; + +error: -+ wine_dlclose(handle, NULL, 0); ++ dlclose(handle); + return NULL; +} + +static void *load_libx11( void ) +{ -+ void *handle = wine_dlopen(SONAME_LIBX11, RTLD_NOW, NULL, 0); ++ void *handle = dlopen(SONAME_LIBX11, RTLD_NOW); + if (!handle) + { + FIXME("Wine cannot find the %s library.\n", SONAME_LIBX11); @@ -1843,7 +1843,7 @@ index 000000000..e2a64065e + return handle; + +error: -+ wine_dlclose(handle, NULL, 0); ++ dlclose(handle); + return NULL; +} + @@ -2176,9 +2176,9 @@ index 000000000..e2a64065e + + pXCloseDisplay(This->x11_display); + -+ wine_dlclose(This->x11_handle, NULL, 0); -+ wine_dlclose(This->va_x11_handle, NULL, 0); -+ wine_dlclose(This->va_handle, NULL, 0); ++ dlclose(This->x11_handle); ++ dlclose(This->va_x11_handle); ++ dlclose(This->va_handle); + + CoTaskMemFree(This); + } @@ -2440,11 +2440,11 @@ index 000000000..e2a64065e + if (videoservice->x11_display) + pXCloseDisplay(videoservice->x11_display); + if (videoservice->x11_handle) -+ wine_dlclose(videoservice->x11_handle, NULL, 0); ++ dlclose(videoservice->x11_handle); + if (videoservice->va_x11_handle) -+ wine_dlclose(videoservice->va_x11_handle, NULL, 0); ++ dlclose(videoservice->va_x11_handle); + if (videoservice->va_handle) -+ wine_dlclose(videoservice->va_handle, NULL, 0); ++ dlclose(videoservice->va_handle); + + CoTaskMemFree(videoservice); + return NULL; @@ -2460,7 +2460,7 @@ index 000000000..e2a64065e + +#endif /* HAVE_VAAPI */ diff --git a/dlls/dxva2/videoservices.c b/dlls/dxva2/videoservices.c -index 11cba1441..84222dce5 100644 +index 11cba14417a..84222dce558 100644 --- a/dlls/dxva2/videoservices.c +++ b/dlls/dxva2/videoservices.c @@ -1,5 +1,5 @@ @@ -2637,5 +2637,5 @@ index 11cba1441..84222dce5 100644 return E_NOINTERFACE; } -- -2.25.0 +2.25.1 diff --git a/patches/dxva2-Video_Decoder/0009-dxva2-Add-DRM-mode-for-vaapi.patch b/patches/dxva2-Video_Decoder/0009-dxva2-Add-DRM-mode-for-vaapi.patch index d4795cb3..4c8bf3df 100644 --- a/patches/dxva2-Video_Decoder/0009-dxva2-Add-DRM-mode-for-vaapi.patch +++ b/patches/dxva2-Video_Decoder/0009-dxva2-Add-DRM-mode-for-vaapi.patch @@ -1,4 +1,4 @@ -From 84b8c115d10082aff224d56bebc3fbd63c0b6377 Mon Sep 17 00:00:00 2001 +From 8f9f3999c7b8cbd610fa0e91d1ffeb9a59f687c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Wed, 4 Mar 2015 03:57:29 +0100 Subject: [PATCH] dxva2: Add DRM mode for vaapi. @@ -11,10 +11,10 @@ Subject: [PATCH] dxva2: Add DRM mode for vaapi. 4 files changed, 91 insertions(+), 22 deletions(-) diff --git a/configure.ac b/configure.ac -index 2d60234b02..7a93b20ca6 100644 +index 13584352f3e..06df84aa378 100644 --- a/configure.ac +++ b/configure.ac -@@ -1297,17 +1297,18 @@ This probably prevents linking to OpenGL. Try deleting the file and restarting c +@@ -1322,17 +1322,18 @@ This probably prevents linking to OpenGL. Try deleting the file and restarting c OpenGL and Direct3D won't be supported.]) dnl **** Check for libva **** @@ -38,7 +38,7 @@ index 2d60234b02..7a93b20ca6 100644 CPPFLAGS="$ac_save_CPPFLAGS" diff --git a/dlls/dxva2/dxva2_private.h b/dlls/dxva2/dxva2_private.h -index 5df59bd3f0..14ac586240 100644 +index 5df59bd3f03..b1d2dd9b92d 100644 --- a/dlls/dxva2/dxva2_private.h +++ b/dlls/dxva2/dxva2_private.h @@ -22,6 +22,7 @@ @@ -74,7 +74,7 @@ index 5df59bd3f0..14ac586240 100644 static inline WineVideoServiceImpl *impl_from_IWineVideoService( IWineVideoService *iface ) diff --git a/dlls/dxva2/main.c b/dlls/dxva2/main.c -index 3006f175b7..9da3995f78 100644 +index 3006f175b7f..9da3995f788 100644 --- a/dlls/dxva2/main.c +++ b/dlls/dxva2/main.c @@ -33,6 +33,8 @@ @@ -100,7 +100,7 @@ index 3006f175b7..9da3995f78 100644 if (appkey) RegCloseKey(appkey); } diff --git a/dlls/dxva2/vaapi.c b/dlls/dxva2/vaapi.c -index 4c570f5b94..1b19684053 100644 +index ef5fb5d26a6..8be65df82f7 100644 --- a/dlls/dxva2/vaapi.c +++ b/dlls/dxva2/vaapi.c @@ -55,6 +55,7 @@ MAKE_FUNCPTR(vaEndPicture); @@ -117,7 +117,7 @@ index 4c570f5b94..1b19684053 100644 +static void *load_libva_drm( void ) +{ -+ void *handle = wine_dlopen(SONAME_LIBVA_DRM, RTLD_NOW, NULL, 0); ++ void *handle = dlopen(SONAME_LIBVA_DRM, RTLD_NOW); + if (!handle) + { + FIXME("Wine cannot find the %s library.\n", SONAME_LIBVA_DRM); @@ -128,34 +128,34 @@ index 4c570f5b94..1b19684053 100644 + return handle; + +error: -+ wine_dlclose(handle, NULL, 0); ++ dlclose(handle); + return NULL; +} + static void *load_libx11( void ) { - void *handle = wine_dlopen(SONAME_LIBX11, RTLD_NOW, NULL, 0); + void *handle = dlopen(SONAME_LIBX11, RTLD_NOW); @@ -480,11 +498,18 @@ static ULONG WINAPI WineVideoService_Release( IWineVideoService *iface ) pvaTerminate(This->va_display); vaapi_unlock(); - pXCloseDisplay(This->x11_display); - -- wine_dlclose(This->x11_handle, NULL, 0); -- wine_dlclose(This->va_x11_handle, NULL, 0); -- wine_dlclose(This->va_handle, NULL, 0); +- dlclose(This->x11_handle); +- dlclose(This->va_x11_handle); +- dlclose(This->va_handle); + if (This->x11_display) + pXCloseDisplay(This->x11_display); + if (This->x11_handle) -+ wine_dlclose(This->x11_handle, NULL, 0); ++ dlclose(This->x11_handle); + if (This->drm_fd > 0) + close(This->drm_fd); + if (This->va_drm_handle) -+ wine_dlclose(This->va_drm_handle, NULL, 0); ++ dlclose(This->va_drm_handle); + if (This->va_x11_handle) -+ wine_dlclose(This->va_x11_handle, NULL, 0); ++ dlclose(This->va_x11_handle); + if (This->va_handle) -+ wine_dlclose(This->va_handle, NULL, 0); ++ dlclose(This->va_handle); CoTaskMemFree(This); } @@ -231,14 +231,14 @@ index 4c570f5b94..1b19684053 100644 @@ -749,6 +800,10 @@ err: pXCloseDisplay(videoservice->x11_display); if (videoservice->x11_handle) - wine_dlclose(videoservice->x11_handle, NULL, 0); + dlclose(videoservice->x11_handle); + if (videoservice->drm_fd > 0) + close(videoservice->drm_fd); + if (videoservice->va_drm_handle) -+ wine_dlclose(videoservice->va_drm_handle, NULL, 0); ++ dlclose(videoservice->va_drm_handle); if (videoservice->va_x11_handle) - wine_dlclose(videoservice->va_x11_handle, NULL, 0); + dlclose(videoservice->va_x11_handle); if (videoservice->va_handle) -- -2.17.1 +2.25.1 diff --git a/patches/nvcuda-CUDA_Support/0003-nvcuda-First-implementation.patch b/patches/nvcuda-CUDA_Support/0003-nvcuda-First-implementation.patch index c6df6557..33d0ae8f 100644 --- a/patches/nvcuda-CUDA_Support/0003-nvcuda-First-implementation.patch +++ b/patches/nvcuda-CUDA_Support/0003-nvcuda-First-implementation.patch @@ -862,7 +862,7 @@ index 8b7eb9c37..3ef7c3505 100644 + +static BOOL load_functions(void) +{ -+ cuda_handle = wine_dlopen("libcuda.so", RTLD_NOW, NULL, 0); ++ cuda_handle = dlopen("libcuda.so", RTLD_NOW); + + if (!cuda_handle) + { @@ -870,7 +870,7 @@ index 8b7eb9c37..3ef7c3505 100644 + return FALSE; + } + -+ #define LOAD_FUNCPTR(f) if((p##f = wine_dlsym(cuda_handle, #f, NULL, 0)) == NULL){FIXME("Can't find symbol %s\n", #f); return FALSE;} ++ #define LOAD_FUNCPTR(f) if((p##f = dlsym(cuda_handle, #f)) == NULL){FIXME("Can't find symbol %s\n", #f); return FALSE;} + + LOAD_FUNCPTR(cuArray3DCreate); + LOAD_FUNCPTR(cuArray3DCreate_v2); @@ -2680,7 +2680,7 @@ index 8b7eb9c37..3ef7c3505 100644 + break; + case DLL_PROCESS_DETACH: + if (reserved) break; -+ if (cuda_handle) wine_dlclose(cuda_handle, NULL, 0); ++ if (cuda_handle) dlclose(cuda_handle); + break; + case DLL_THREAD_ATTACH: + case DLL_THREAD_DETACH: diff --git a/patches/nvcuda-CUDA_Support/0004-nvcuda-Implement-new-functions-added-in-CUDA-6.5.patch b/patches/nvcuda-CUDA_Support/0004-nvcuda-Implement-new-functions-added-in-CUDA-6.5.patch index 3aed7567..8ebf558f 100644 --- a/patches/nvcuda-CUDA_Support/0004-nvcuda-Implement-new-functions-added-in-CUDA-6.5.patch +++ b/patches/nvcuda-CUDA_Support/0004-nvcuda-Implement-new-functions-added-in-CUDA-6.5.patch @@ -37,8 +37,8 @@ index 3ef7c35..3118c49 100644 @@ -306,6 +320,7 @@ static BOOL load_functions(void) } - #define LOAD_FUNCPTR(f) if((p##f = wine_dlsym(cuda_handle, #f, NULL, 0)) == NULL){FIXME("Can't find symbol %s\n", #f); return FALSE;} -+ #define TRY_LOAD_FUNCPTR(f) p##f = wine_dlsym(cuda_handle, #f, NULL, 0) + #define LOAD_FUNCPTR(f) if((p##f = dlsym(cuda_handle, #f)) == NULL){FIXME("Can't find symbol %s\n", #f); return FALSE;} ++ #define TRY_LOAD_FUNCPTR(f) p##f = dlsym(cuda_handle, #f) LOAD_FUNCPTR(cuArray3DCreate); LOAD_FUNCPTR(cuArray3DCreate_v2); diff --git a/patches/nvcuda-CUDA_Support/0010-nvcuda-Search-for-dylib-library-on-Mac-OS-X.patch b/patches/nvcuda-CUDA_Support/0010-nvcuda-Search-for-dylib-library-on-Mac-OS-X.patch index 43822bb8..6031c640 100644 --- a/patches/nvcuda-CUDA_Support/0010-nvcuda-Search-for-dylib-library-on-Mac-OS-X.patch +++ b/patches/nvcuda-CUDA_Support/0010-nvcuda-Search-for-dylib-library-on-Mac-OS-X.patch @@ -15,7 +15,7 @@ index ec32da2..67376c7 100644 static BOOL load_functions(void) { -- cuda_handle = wine_dlopen("libcuda.so", RTLD_NOW, NULL, 0); +- cuda_handle = dlopen("libcuda.so", RTLD_NOW); + static const char *libname[] = + { + #ifdef __APPLE__ @@ -31,7 +31,7 @@ index ec32da2..67376c7 100644 + + for (i = 0; i < sizeof(libname)/sizeof(libname[0]); i++) + { -+ cuda_handle = wine_dlopen(libname[i], RTLD_NOW, NULL, 0); ++ cuda_handle = dlopen(libname[i], RTLD_NOW); + if (cuda_handle) break; + } diff --git a/patches/nvcuvid-CUDA_Video_Support/0001-nvcuvid-First-implementation.patch b/patches/nvcuvid-CUDA_Video_Support/0001-nvcuvid-First-implementation.patch index 905782bb..9ac92b9e 100644 --- a/patches/nvcuvid-CUDA_Video_Support/0001-nvcuvid-First-implementation.patch +++ b/patches/nvcuvid-CUDA_Video_Support/0001-nvcuvid-First-implementation.patch @@ -111,7 +111,7 @@ index 000000000..05fec0fff + +static BOOL load_functions(void) +{ -+ cuvid_handle = wine_dlopen("libnvcuvid.so", RTLD_NOW, NULL, 0); ++ cuvid_handle = dlopen("libnvcuvid.so", RTLD_NOW); + + if (!cuvid_handle) + { @@ -119,7 +119,7 @@ index 000000000..05fec0fff + return FALSE; + } + -+ #define LOAD_FUNCPTR(f) if((p##f = wine_dlsym(cuvid_handle, #f, NULL, 0)) == NULL){FIXME("Can't find symbol %s\n", #f); return FALSE;} ++ #define LOAD_FUNCPTR(f) if((p##f = dlsym(cuvid_handle, #f)) == NULL){FIXME("Can't find symbol %s\n", #f); return FALSE;} + + LOAD_FUNCPTR(cuvidCreateDecoder); + LOAD_FUNCPTR(cuvidCreateVideoParser); @@ -579,7 +579,7 @@ index 000000000..05fec0fff + break; + case DLL_PROCESS_DETACH: + if (reserved) break; -+ if (cuvid_handle) wine_dlclose(cuvid_handle, NULL, 0); ++ if (cuvid_handle) dlclose(cuvid_handle); + break; + } + diff --git a/patches/nvencodeapi-Video_Encoder/0001-nvencodeapi-First-implementation.patch b/patches/nvencodeapi-Video_Encoder/0001-nvencodeapi-First-implementation.patch index d73712d9..31fb734d 100644 --- a/patches/nvencodeapi-Video_Encoder/0001-nvencodeapi-First-implementation.patch +++ b/patches/nvencodeapi-Video_Encoder/0001-nvencodeapi-First-implementation.patch @@ -375,14 +375,14 @@ index 000000000..91a33fd58 + +static BOOL load_nvencode(void) +{ -+ libnvidia_encode_handle = wine_dlopen("libnvidia-encode.so", RTLD_NOW, NULL, 0); ++ libnvidia_encode_handle = dlopen("libnvidia-encode.so", RTLD_NOW); + if (!libnvidia_encode_handle) + { + FIXME("Wine cannot find the libnvidia-encode.so library, NVIDIA video encoding support disabled.\n"); + return FALSE; + } + -+ pNvEncodeAPICreateInstance = wine_dlsym(libnvidia_encode_handle, "NvEncodeAPICreateInstance", NULL, 0); ++ pNvEncodeAPICreateInstance = dlsym(libnvidia_encode_handle, "NvEncodeAPICreateInstance"); + if (!pNvEncodeAPICreateInstance) + { + FIXME("Can't find symbol NvEncodeAPICreateInstance.\n"); @@ -413,7 +413,7 @@ index 000000000..91a33fd58 + case DLL_PROCESS_DETACH: + if (reserved) break; + if (libnvidia_encode_handle) -+ wine_dlclose(libnvidia_encode_handle, NULL, 0); ++ dlclose(libnvidia_encode_handle); + break; + } + diff --git a/patches/nvencodeapi-Video_Encoder/0002-nvencodeapi-Add-debian-specific-paths-to-native-libr.patch b/patches/nvencodeapi-Video_Encoder/0002-nvencodeapi-Add-debian-specific-paths-to-native-libr.patch index e8dbeef1..a0538375 100644 --- a/patches/nvencodeapi-Video_Encoder/0002-nvencodeapi-Add-debian-specific-paths-to-native-libr.patch +++ b/patches/nvencodeapi-Video_Encoder/0002-nvencodeapi-Add-debian-specific-paths-to-native-libr.patch @@ -15,7 +15,7 @@ index 7a0f531..557c6ae 100644 static BOOL load_nvencode(void) { -- libnvidia_encode_handle = wine_dlopen("libnvidia-encode.so", RTLD_NOW, NULL, 0); +- libnvidia_encode_handle = dlopen("libnvidia-encode.so", RTLD_NOW); + static const char *libname[] = + { + "libnvidia-encode.so", @@ -29,7 +29,7 @@ index 7a0f531..557c6ae 100644 + + for (i = 0; i < sizeof(libname)/sizeof(libname[0]); i++) + { -+ libnvidia_encode_handle = wine_dlopen(libname[i], RTLD_NOW, NULL, 0); ++ libnvidia_encode_handle = dlopen(libname[i], RTLD_NOW); + if (libnvidia_encode_handle) break; + } + diff --git a/patches/opencl-version_1_2/0001-opencl-Add-OpenCL-1.0-function-pointer-loader.patch b/patches/opencl-version_1_2/0001-opencl-Add-OpenCL-1.0-function-pointer-loader.patch index 386ee492..388bfe11 100644 --- a/patches/opencl-version_1_2/0001-opencl-Add-OpenCL-1.0-function-pointer-loader.patch +++ b/patches/opencl-version_1_2/0001-opencl-Add-OpenCL-1.0-function-pointer-loader.patch @@ -285,7 +285,7 @@ index 2d145bf..81feabb 100644 + + case DLL_PROCESS_DETACH: + if (reserved) break; -+ if (opencl_handle) wine_dlclose(opencl_handle, NULL, 0); ++ if (opencl_handle) dlclose(opencl_handle); + } + + return TRUE; @@ -306,7 +306,7 @@ index 2d145bf..81feabb 100644 +#ifdef SONAME_LIBOPENCL + char error[256]; + -+ opencl_handle = wine_dlopen(SONAME_LIBOPENCL, RTLD_NOW, error, sizeof(error)); ++ opencl_handle = dlopen(SONAME_LIBOPENCL, RTLD_NOW); + if (opencl_handle != NULL) + { + TRACE("Opened library %s\n", SONAME_LIBOPENCL); @@ -332,14 +332,14 @@ index 2d145bf..81feabb 100644 + */ +static BOOL load_opencl_func(void) +{ -+ char error[256]; ++ + + if (opencl_handle == NULL) + return FALSE; + +#define LOAD_FUNCPTR(f) \ -+ if (!(p##f = wine_dlsym(opencl_handle, #f, error, sizeof(error)))) \ -+ WARN("%s not found in %s (%s)\n", #f, SONAME_LIBOPENCL, error); ++ if (!(p##f = dlsym(opencl_handle, #f))) \ ++ WARN("%s not found in %s\n", #f, SONAME_LIBOPENCL); + + /* Platform API */ + LOAD_FUNCPTR(clGetPlatformIDs); diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 61d0ea30..c0d3d28f 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -52,7 +52,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "ca092dcf819174699f9bb1af45a285dff2f6ac81" + echo "38e95ed2227dd3f0fc3d1394c884265d43e3b283" } # Show version information @@ -2057,20 +2057,16 @@ fi # | # | Modified files: # | * dlls/kernel32/process.c, dlls/ntdll/misc.c, dlls/ntdll/ntdll.spec, include/wine/library.h, libs/wine/Makefile.in, -# | libs/wine/config.c, libs/wine/loader.c, libs/wine/wine.map, loader/main.c +# | libs/wine/config.c, libs/wine/wine.map, loader/main.c # | if test "$enable_Staging" -eq 1; then patch_apply Staging/0001-kernel32-Add-winediag-message-to-show-warning-that-t.patch patch_apply Staging/0002-winelib-Append-Staging-at-the-end-of-the-version-s.patch patch_apply Staging/0003-loader-Add-commandline-option-patches-to-show-the-pa.patch - patch_apply Staging/0004-loader-Add-commandline-option-check-libs.patch - patch_apply Staging/0005-loader-Print-library-paths-for-check-libs-on-Mac-OS-.patch ( printf '%s\n' '+ { "Sebastian Lackner", "kernel32: Add winediag message to show warning, that this isn'\''t vanilla wine.", 1 },'; printf '%s\n' '+ { "Sebastian Lackner", "winelib: Append '\''(Staging)'\'' at the end of the version string.", 1 },'; printf '%s\n' '+ { "Sebastian Lackner", "loader: Add commandline option --patches to show the patch list.", 1 },'; - printf '%s\n' '+ { "Michael Müller", "loader: Add commandline option --check-libs.", 1 },'; - printf '%s\n' '+ { "Michael Müller", "loader: Print library paths for --check-libs on Mac OS X.", 1 },'; ) >> "$patchlist" fi diff --git a/patches/user32-rawinput-mouse/0008-winex11.drv-Keep-track-of-pointer-and-device-button-.patch b/patches/user32-rawinput-mouse/0008-winex11.drv-Keep-track-of-pointer-and-device-button-.patch index 3ff2d5e9..da90ebd1 100644 --- a/patches/user32-rawinput-mouse/0008-winex11.drv-Keep-track-of-pointer-and-device-button-.patch +++ b/patches/user32-rawinput-mouse/0008-winex11.drv-Keep-track-of-pointer-and-device-button-.patch @@ -1,7 +1,7 @@ -From ef0b82046445fe430ab85bb8069f3e4536b11f7a Mon Sep 17 00:00:00 2001 +From c65d46aba7d72f8bde0d74b110382a4383dde085 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Bernon?= Date: Thu, 19 Dec 2019 22:34:44 +0100 -Subject: [PATCH 08/12] winex11.drv: Keep track of pointer and device button +Subject: [PATCH] winex11.drv: Keep track of pointer and device button mappings. We are going to receive raw button events and we will need to apply the @@ -16,10 +16,10 @@ Original patch by Andrew Eikum . 4 files changed, 106 insertions(+), 8 deletions(-) diff --git a/dlls/winex11.drv/keyboard.c b/dlls/winex11.drv/keyboard.c -index 7856b04c8f5..3f5d76be57b 100644 +index 2a3bed787ab..37c96c926f4 100644 --- a/dlls/winex11.drv/keyboard.c +++ b/dlls/winex11.drv/keyboard.c -@@ -2010,13 +2010,24 @@ BOOL X11DRV_MappingNotify( HWND dummy, XEvent *event ) +@@ -1977,13 +1977,24 @@ BOOL X11DRV_MappingNotify( HWND dummy, XEvent *event ) { HWND hwnd; @@ -51,7 +51,7 @@ index 7856b04c8f5..3f5d76be57b 100644 } diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c -index 105db08a78a..19ed2a29287 100644 +index b420f4bbd4b..8691cc01531 100644 --- a/dlls/winex11.drv/mouse.c +++ b/dlls/winex11.drv/mouse.c @@ -25,6 +25,9 @@ @@ -64,7 +64,7 @@ index 105db08a78a..19ed2a29287 100644 #ifdef HAVE_X11_EXTENSIONS_XINPUT2_H #include #endif -@@ -143,6 +146,14 @@ MAKE_FUNCPTR(XISelectEvents); +@@ -142,6 +145,14 @@ MAKE_FUNCPTR(XISelectEvents); #undef MAKE_FUNCPTR #endif @@ -79,7 +79,7 @@ index 105db08a78a..19ed2a29287 100644 /*********************************************************************** * X11DRV_Xcursor_Init * -@@ -249,6 +260,70 @@ void sync_window_cursor( Window window ) +@@ -247,6 +258,70 @@ void sync_window_cursor( Window window ) set_window_cursor( window, cursor ); } @@ -150,7 +150,7 @@ index 105db08a78a..19ed2a29287 100644 #ifdef HAVE_X11_EXTENSIONS_XINPUT2_H /*********************************************************************** * update_relative_valuators -@@ -1792,6 +1867,8 @@ static BOOL X11DRV_DeviceChanged( XGenericEventCookie *xev ) +@@ -1790,6 +1865,8 @@ static BOOL X11DRV_DeviceChanged( XGenericEventCookie *xev ) if (event->reason != XISlaveSwitch) return FALSE; update_relative_valuators( event->classes, event->num_classes ); @@ -159,7 +159,7 @@ index 105db08a78a..19ed2a29287 100644 return TRUE; } -@@ -1861,13 +1938,12 @@ static BOOL X11DRV_RawMotion( XGenericEventCookie *xev ) +@@ -1859,13 +1936,12 @@ static BOOL X11DRV_RawMotion( XGenericEventCookie *xev ) #endif /* HAVE_X11_EXTENSIONS_XINPUT2_H */ @@ -172,9 +172,9 @@ index 105db08a78a..19ed2a29287 100644 -#if defined(SONAME_LIBXI) && defined(HAVE_X11_EXTENSIONS_XINPUT2_H) +#if defined(SONAME_LIBXI) int event, error; - void *libxi_handle = wine_dlopen( SONAME_LIBXI, RTLD_NOW, NULL, 0 ); + void *libxi_handle = dlopen( SONAME_LIBXI, RTLD_NOW ); -@@ -1883,11 +1959,20 @@ void X11DRV_XInput2_Init(void) +@@ -1881,11 +1957,20 @@ void X11DRV_XInput2_Init(void) return; \ } @@ -196,10 +196,10 @@ index 105db08a78a..19ed2a29287 100644 xinput2_available = XQueryExtension( gdi_display, "XInputExtension", &xinput2_opcode, &event, &error ); diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h -index 432dd5909ca..7145fec74e7 100644 +index c2c63278a07..01f36c04862 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h -@@ -632,6 +632,7 @@ extern void retry_grab_clipping_window(void) DECLSPEC_HIDDEN; +@@ -630,6 +630,7 @@ extern void retry_grab_clipping_window(void) DECLSPEC_HIDDEN; extern BOOL clip_fullscreen_window( HWND hwnd, BOOL reset ) DECLSPEC_HIDDEN; extern void move_resize_window( HWND hwnd, int dir ) DECLSPEC_HIDDEN; extern void X11DRV_InitKeyboard( Display *display ) DECLSPEC_HIDDEN; @@ -208,10 +208,10 @@ index 432dd5909ca..7145fec74e7 100644 DWORD mask, DWORD flags ) DECLSPEC_HIDDEN; diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c -index 11e4ee29155..ff9185a523c 100644 +index e6e61e801e1..20e829ba64f 100644 --- a/dlls/winex11.drv/x11drv_main.c +++ b/dlls/winex11.drv/x11drv_main.c -@@ -623,6 +623,7 @@ static BOOL process_attach(void) +@@ -615,6 +615,7 @@ static BOOL process_attach(void) if (use_xkb) use_xkb = XkbUseExtension( gdi_display, NULL, NULL ); #endif X11DRV_InitKeyboard( gdi_display ); @@ -220,5 +220,5 @@ index 11e4ee29155..ff9185a523c 100644 X11DRV_DisplayDevices_Init(FALSE); -- -2.24.1 +2.25.1 diff --git a/patches/uxtheme-GTK_Theming/0001-uxtheme-Initial-implementation-of-GTK-backend.patch b/patches/uxtheme-GTK_Theming/0001-uxtheme-Initial-implementation-of-GTK-backend.patch index 8bb75e14..97ee730b 100644 --- a/patches/uxtheme-GTK_Theming/0001-uxtheme-Initial-implementation-of-GTK-backend.patch +++ b/patches/uxtheme-GTK_Theming/0001-uxtheme-Initial-implementation-of-GTK-backend.patch @@ -2864,14 +2864,14 @@ index 000000000..ddaa96496 + +static void free_gtk3_libs(void) +{ -+ if (libgtk3) wine_dlclose(libgtk3, NULL, 0); -+ if (libcairo) wine_dlclose(libcairo, NULL, 0); -+ if (libgobject2) wine_dlclose(libgobject2, NULL, 0); ++ if (libgtk3) dlclose(libgtk3); ++ if (libcairo) dlclose(libcairo); ++ if (libgobject2) dlclose(libgobject2); + libgtk3 = libcairo = libgobject2 = NULL; +} + +#define LOAD_FUNCPTR(lib, f) \ -+ if(!(p##f = wine_dlsym(lib, #f, NULL, 0))) \ ++ if(!(p##f = dlsym(lib, #f))) \ + { \ + WARN("Can't find symbol %s.\n", #f); \ + goto error; \ @@ -2882,7 +2882,7 @@ index 000000000..ddaa96496 + if (libgtk3 && libcairo && libgobject2) + return TRUE; + -+ libgtk3 = wine_dlopen(SONAME_LIBGTK_3, RTLD_NOW, NULL, 0); ++ libgtk3 = dlopen(SONAME_LIBGTK_3, RTLD_NOW); + if (!libgtk3) + { + FIXME("Wine cannot find the %s library.\n", SONAME_LIBGTK_3); @@ -2940,7 +2940,7 @@ index 000000000..ddaa96496 + LOAD_FUNCPTR(libgtk3, gtk_widget_style_get) + LOAD_FUNCPTR(libgtk3, gtk_window_new) + -+ libcairo = wine_dlopen(SONAME_LIBCAIRO, RTLD_NOW, NULL, 0); ++ libcairo = dlopen(SONAME_LIBCAIRO, RTLD_NOW); + if (!libcairo) + { + FIXME("Wine cannot find the %s library.\n", SONAME_LIBCAIRO); @@ -2955,7 +2955,7 @@ index 000000000..ddaa96496 + LOAD_FUNCPTR(libcairo, cairo_surface_destroy) + LOAD_FUNCPTR(libcairo, cairo_surface_flush) + -+ libgobject2 = wine_dlopen(SONAME_LIBGOBJECT_2_0, RTLD_NOW, NULL, 0); ++ libgobject2 = dlopen(SONAME_LIBGOBJECT_2_0, RTLD_NOW); + if (!libgobject2) + { + FIXME("Wine cannot find the %s library.\n", SONAME_LIBGOBJECT_2_0); diff --git a/patches/uxtheme-GTK_Theming/0004-uxtheme-Reset-FPU-flags-before-calling-GTK3-function.patch b/patches/uxtheme-GTK_Theming/0004-uxtheme-Reset-FPU-flags-before-calling-GTK3-function.patch index 4e1b2a3c..57f8f6db 100644 --- a/patches/uxtheme-GTK_Theming/0004-uxtheme-Reset-FPU-flags-before-calling-GTK3-function.patch +++ b/patches/uxtheme-GTK_Theming/0004-uxtheme-Reset-FPU-flags-before-calling-GTK3-function.patch @@ -38,7 +38,7 @@ index bbee8e87..86ea4d1b 100644 + static void free_gtk3_libs(void) { - if (libgtk3) wine_dlclose(libgtk3, NULL, 0); + if (libgtk3) dlclose(libgtk3); @@ -319,11 +340,15 @@ BOOL uxtheme_gtk_enabled(void) HRESULT uxtheme_gtk_CloseThemeData(HTHEME htheme) { diff --git a/patches/winex11-Vulkan_support/0001-winex11-Specify-a-default-vulkan-driver-if-one-not-f.patch b/patches/winex11-Vulkan_support/0001-winex11-Specify-a-default-vulkan-driver-if-one-not-f.patch index b28c6ea7..37575d95 100644 --- a/patches/winex11-Vulkan_support/0001-winex11-Specify-a-default-vulkan-driver-if-one-not-f.patch +++ b/patches/winex11-Vulkan_support/0001-winex11-Specify-a-default-vulkan-driver-if-one-not-f.patch @@ -1,4 +1,4 @@ -From a6eeb7e5bf294f4ea0f9abf021f5176a4503b979 Mon Sep 17 00:00:00 2001 +From 2776cc4fd2366f0a687e90d0cfaaf7c3bdc63387 Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Fri, 1 Jun 2018 14:03:26 +1000 Subject: [PATCH] winex11: Specify a default vulkan driver if one not found at @@ -11,10 +11,10 @@ vulkan library in backports and not everybody will have this mapped. 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/dlls/winex11.drv/vulkan.c b/dlls/winex11.drv/vulkan.c -index 28ae1a9..9f51270 100644 +index 4de82586906..f254cda3227 100644 --- a/dlls/winex11.drv/vulkan.c +++ b/dlls/winex11.drv/vulkan.c -@@ -41,10 +41,12 @@ +@@ -40,10 +40,12 @@ #include "wine/vulkan_driver.h" WINE_DEFAULT_DEBUG_CHANNEL(vulkan); @@ -29,18 +29,18 @@ index 28ae1a9..9f51270 100644 static CRITICAL_SECTION context_section; static CRITICAL_SECTION_DEBUG critsect_debug = { -@@ -105,9 +107,17 @@ static void *vulkan_handle; +@@ -106,9 +108,17 @@ static void *vulkan_handle; static BOOL WINAPI wine_vk_init(INIT_ONCE *once, void *param, void **context) { -- if (!(vulkan_handle = wine_dlopen(SONAME_LIBVULKAN, RTLD_NOW, NULL, 0))) +- if (!(vulkan_handle = dlopen(SONAME_LIBVULKAN, RTLD_NOW))) + const char *libvulkan_candidates[] = {SONAME_LIBVULKAN, + "libvulkan.so.1", + "libvulkan.so", + NULL}; + int i; + for (i=0; libvulkan_candidates[i] && !vulkan_handle; i++) -+ vulkan_handle = wine_dlopen(libvulkan_candidates[i], RTLD_NOW, NULL, 0); ++ vulkan_handle = dlopen(libvulkan_candidates[i], RTLD_NOW); + + if (!vulkan_handle) { @@ -49,7 +49,7 @@ index 28ae1a9..9f51270 100644 return TRUE; } -@@ -593,16 +603,3 @@ const struct vulkan_funcs *get_vulkan_driver(UINT version) +@@ -652,16 +662,3 @@ const struct vulkan_funcs *get_vulkan_driver(UINT version) return NULL; } @@ -67,5 +67,5 @@ index 28ae1a9..9f51270 100644 - -#endif /* SONAME_LIBVULKAN */ -- -1.9.1 +2.25.1 diff --git a/patches/wpcap-Dynamic_Linking/0001-wpcap-Load-libpcap-dynamically.patch b/patches/wpcap-Dynamic_Linking/0001-wpcap-Load-libpcap-dynamically.patch index d2fc91ba..143739f7 100644 --- a/patches/wpcap-Dynamic_Linking/0001-wpcap-Load-libpcap-dynamically.patch +++ b/patches/wpcap-Dynamic_Linking/0001-wpcap-Load-libpcap-dynamically.patch @@ -92,7 +92,7 @@ index d2f1be7a3..c355fc6e1 100644 + +static BOOL load_functions(void) +{ -+ pcap_handle = wine_dlopen(SONAME_LIBPCAP, RTLD_NOW, NULL, 0); ++ pcap_handle = dlopen(SONAME_LIBPCAP, RTLD_NOW); + + if (!pcap_handle) + { @@ -100,7 +100,7 @@ index d2f1be7a3..c355fc6e1 100644 + return FALSE; + } + -+ #define LOAD_FUNCPTR(f) if((p##f = wine_dlsym(pcap_handle, #f, NULL, 0)) == NULL){WARN("Can't find symbol %s\n", #f); return FALSE;} ++ #define LOAD_FUNCPTR(f) if((p##f = dlsym(pcap_handle, #f)) == NULL){WARN("Can't find symbol %s\n", #f); return FALSE;} + LOAD_FUNCPTR(pcap_breakloop); + LOAD_FUNCPTR(pcap_close); + LOAD_FUNCPTR(pcap_compile); @@ -412,7 +412,7 @@ index d2f1be7a3..c355fc6e1 100644 + break; + case DLL_PROCESS_DETACH: + if (lpvReserved) break; -+ if (pcap_handle) wine_dlclose(pcap_handle, NULL, 0); ++ if (pcap_handle) dlclose(pcap_handle); + break; + } +