You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-04-13 14:42:51 -07:00
Compare commits
69 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
76900de5bb | ||
|
776306026a | ||
|
c4c72e90ab | ||
|
f8c3c9a6f8 | ||
|
39678da196 | ||
|
be8a670b5b | ||
|
4d11895651 | ||
|
bf3fbb7bdf | ||
|
160a5024b4 | ||
|
f36c844f11 | ||
|
732ab97a7e | ||
|
46fbb7d31e | ||
|
44d1a45e98 | ||
|
f23b6cb7dc | ||
|
4d01e48843 | ||
|
90109a5fc5 | ||
|
e8abb98858 | ||
|
56b4eed468 | ||
|
755d1ca559 | ||
|
001ea51fb5 | ||
|
db80e169c7 | ||
|
7757a2d4f6 | ||
|
1a980ed93d | ||
|
528306ccb6 | ||
|
7fe7d87f09 | ||
|
805f2e9252 | ||
|
18f7125892 | ||
|
f993930ee6 | ||
|
2a9e87abea | ||
|
af97ec8ce0 | ||
|
b14430433d | ||
|
f9d1798edb | ||
|
e5da84dc36 | ||
|
75c7644c3d | ||
|
7c7868f4bb | ||
|
d1a8b6bc14 | ||
|
53b02cd0ee | ||
|
36b8b8cc65 | ||
|
13536af59c | ||
|
a6f3bd989e | ||
|
0830db32cd | ||
|
cd7d77fe36 | ||
|
2e9977f4ac | ||
|
a1246b5e92 | ||
|
676dd02663 | ||
|
648db00708 | ||
|
6bfaa3b0a5 | ||
|
cbf7f73313 | ||
|
c896e5cb69 | ||
|
4d65ec9456 | ||
|
d14250ab03 | ||
|
789f5c7c64 | ||
|
69cb47fd36 | ||
|
8450903b5c | ||
|
ffe93505d2 | ||
|
5213d551f8 | ||
|
e61a75f75f | ||
|
7428dd8656 | ||
|
40e84b052b | ||
|
92b2688a74 | ||
|
f7eec766a5 | ||
|
b4e0277488 | ||
|
f54b943bca | ||
|
6138369b4f | ||
|
59fe96c14c | ||
|
afdf5020ff | ||
|
2fc5c88068 | ||
|
ad3de029e7 | ||
|
4ff3984c49 |
@@ -1,4 +1,4 @@
|
||||
From d216f85a593a09e7983d9178fb3e1f20bfcf08cc Mon Sep 17 00:00:00 2001
|
||||
From 63d2046a8f4388fbc7c12a07ae5f412fccc1b202 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Thu, 29 May 2014 23:43:45 +0200
|
||||
Subject: [PATCH] loader: Add commandline option --patches to show the patch
|
||||
@@ -14,7 +14,7 @@ Subject: [PATCH] loader: Add commandline option --patches to show the patch
|
||||
6 files changed, 58 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/ntdll/misc.c b/dlls/ntdll/misc.c
|
||||
index c29a1c26c..8906e1942 100644
|
||||
index c29a1c26c26..8906e194272 100644
|
||||
--- a/dlls/ntdll/misc.c
|
||||
+++ b/dlls/ntdll/misc.c
|
||||
@@ -60,6 +60,14 @@ const char * CDECL NTDLL_wine_get_version(void)
|
||||
@@ -33,10 +33,10 @@ index c29a1c26c..8906e1942 100644
|
||||
* wine_get_build_id (NTDLL.@)
|
||||
*/
|
||||
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
|
||||
index 7aa953ca6..cf7d5b6f9 100644
|
||||
index e61a2578da5..52db67fd978 100644
|
||||
--- a/dlls/ntdll/ntdll.spec
|
||||
+++ b/dlls/ntdll/ntdll.spec
|
||||
@@ -1566,6 +1566,7 @@
|
||||
@@ -1571,6 +1571,7 @@
|
||||
|
||||
# Version
|
||||
@ cdecl wine_get_version() NTDLL_wine_get_version
|
||||
@@ -45,7 +45,7 @@ index 7aa953ca6..cf7d5b6f9 100644
|
||||
@ cdecl wine_get_host_version(ptr ptr) NTDLL_wine_get_host_version
|
||||
|
||||
diff --git a/include/wine/library.h b/include/wine/library.h
|
||||
index a6fe28059..511bf4722 100644
|
||||
index f338c4da190..1f992da6062 100644
|
||||
--- a/include/wine/library.h
|
||||
+++ b/include/wine/library.h
|
||||
@@ -47,6 +47,7 @@ extern const char *wine_get_data_dir(void);
|
||||
@@ -57,7 +57,7 @@ index a6fe28059..511bf4722 100644
|
||||
extern void wine_init_argv0_path( const char *argv0 );
|
||||
extern void wine_exec_wine_binary( const char *name, char **argv, const char *env_var );
|
||||
diff --git a/libs/wine/config.c b/libs/wine/config.c
|
||||
index 2a3314cbf..5b66c063d 100644
|
||||
index 2a3314cbfda..5b66c063db6 100644
|
||||
--- a/libs/wine/config.c
|
||||
+++ b/libs/wine/config.c
|
||||
@@ -504,6 +504,12 @@ const char *wine_get_version(void)
|
||||
@@ -74,22 +74,22 @@ index 2a3314cbf..5b66c063d 100644
|
||||
const char *wine_get_build_id(void)
|
||||
{
|
||||
diff --git a/libs/wine/wine.map b/libs/wine/wine.map
|
||||
index 3f2c430fa..ca46979f5 100644
|
||||
index 7ea849b908e..a7359ee7872 100644
|
||||
--- a/libs/wine/wine.map
|
||||
+++ b/libs/wine/wine.map
|
||||
@@ -28,6 +28,7 @@ WINE_1.0
|
||||
wine_get_ss;
|
||||
@@ -22,6 +22,7 @@ WINE_1.0
|
||||
wine_get_server_dir;
|
||||
wine_get_user_name;
|
||||
wine_get_version;
|
||||
+ wine_get_patches;
|
||||
wine_init;
|
||||
wine_init_argv0_path;
|
||||
wine_ldt_alloc_entries;
|
||||
wine_mmap_add_reserved_area;
|
||||
diff --git a/loader/main.c b/loader/main.c
|
||||
index f197cf802..f6629128d 100644
|
||||
index 407c897892d..d97d6b28bf8 100644
|
||||
--- a/loader/main.c
|
||||
+++ b/loader/main.c
|
||||
@@ -54,7 +54,8 @@ static void check_command_line( int argc, char *argv[] )
|
||||
@@ -53,7 +53,8 @@ static void check_command_line( int argc, char *argv[] )
|
||||
static const char usage[] =
|
||||
"Usage: wine PROGRAM [ARGUMENTS...] Run the specified program\n"
|
||||
" wine --help Display this help and exit\n"
|
||||
@@ -99,7 +99,7 @@ index f197cf802..f6629128d 100644
|
||||
|
||||
if (argc <= 1)
|
||||
{
|
||||
@@ -71,6 +72,45 @@ static void check_command_line( int argc, char *argv[] )
|
||||
@@ -70,6 +71,45 @@ static void check_command_line( int argc, char *argv[] )
|
||||
printf( "%s\n", wine_get_build_id() );
|
||||
exit(0);
|
||||
}
|
||||
@@ -146,5 +146,5 @@ index f197cf802..f6629128d 100644
|
||||
|
||||
|
||||
--
|
||||
2.25.0
|
||||
2.25.1
|
||||
|
||||
|
@@ -1,313 +0,0 @@
|
||||
From c07a490a6950f4efe563e38ca78b1aa459dfad86 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
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 511bf4722..557cec20c 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 5b66c063d..e0988513e 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 2a569f5b7..5f10c3f9d 100644
|
||||
--- a/libs/wine/loader.c
|
||||
+++ b/libs/wine/loader.c
|
||||
@@ -1072,6 +1072,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 ca46979f5..22a4e73b0 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;
|
||||
@@ -24,6 +25,7 @@ WINE_1.0
|
||||
wine_get_es;
|
||||
wine_get_fs;
|
||||
wine_get_gs;
|
||||
+ wine_get_libs;
|
||||
wine_get_server_dir;
|
||||
wine_get_ss;
|
||||
wine_get_user_name;
|
||||
diff --git a/loader/main.c b/loader/main.c
|
||||
index f6629128d..a2dc40c51 100644
|
||||
--- a/loader/main.c
|
||||
+++ b/loader/main.c
|
||||
@@ -36,6 +36,12 @@
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
+#ifdef HAVE_DLADDR
|
||||
+# include <dlfcn.h>
|
||||
+#endif
|
||||
+#ifdef HAVE_LINK_H
|
||||
+# include <link.h>
|
||||
+#endif
|
||||
#include <pthread.h>
|
||||
|
||||
#include "wine/library.h"
|
||||
@@ -55,7 +61,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)
|
||||
{
|
||||
@@ -111,6 +118,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.0
|
||||
|
@@ -1,60 +0,0 @@
|
||||
From 07ca5e888c3265c57c88ef1758e6c47fbea4fb07 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
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 <mach-o/dyld.h>
|
||||
+
|
||||
+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
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 8959c13f2be7e2a31f27c8483ee2202692f00710 Mon Sep 17 00:00:00 2001
|
||||
From 8fe522dadc480b57415a7b63e0752de113851231 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sat, 5 Aug 2017 01:45:29 +0200
|
||||
Subject: [PATCH] ntdll: Add function to create new tokens for elevation
|
||||
@@ -14,10 +14,10 @@ Subject: [PATCH] ntdll: Add function to create new tokens for elevation
|
||||
6 files changed, 117 insertions(+)
|
||||
|
||||
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
|
||||
index d626e0bf2..5057e2b07 100644
|
||||
index 853da5c3fcf..33c1355c8b5 100644
|
||||
--- a/dlls/ntdll/ntdll.spec
|
||||
+++ b/dlls/ntdll/ntdll.spec
|
||||
@@ -1556,6 +1556,9 @@
|
||||
@@ -1569,6 +1569,9 @@
|
||||
# Virtual memory
|
||||
@ cdecl __wine_locked_recvmsg(long ptr long)
|
||||
|
||||
@@ -28,12 +28,12 @@ index d626e0bf2..5057e2b07 100644
|
||||
@ cdecl wine_get_version() NTDLL_wine_get_version
|
||||
@ cdecl wine_get_patches() NTDLL_wine_get_patches
|
||||
diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h
|
||||
index ac1469412..6c2345c6c 100644
|
||||
index b62239de5b4..d494dc71263 100644
|
||||
--- a/dlls/ntdll/ntdll_misc.h
|
||||
+++ b/dlls/ntdll/ntdll_misc.h
|
||||
@@ -89,6 +89,9 @@ extern void init_user_process_params( SIZE_T data_size ) DECLSPEC_HIDDEN;
|
||||
extern char **build_envp( const WCHAR *envW ) DECLSPEC_HIDDEN;
|
||||
extern NTSTATUS restart_process( RTL_USER_PROCESS_PARAMETERS *params, NTSTATUS status ) DECLSPEC_HIDDEN;
|
||||
@@ -96,6 +96,9 @@ extern int __wine_main_argc;
|
||||
extern char **__wine_main_argv;
|
||||
extern WCHAR **__wine_main_wargv;
|
||||
|
||||
+/* token */
|
||||
+extern HANDLE CDECL __wine_create_default_token(BOOL admin);
|
||||
@@ -42,10 +42,10 @@ index ac1469412..6c2345c6c 100644
|
||||
extern timeout_t server_start_time DECLSPEC_HIDDEN;
|
||||
extern unsigned int server_cpus DECLSPEC_HIDDEN;
|
||||
diff --git a/dlls/ntdll/process.c b/dlls/ntdll/process.c
|
||||
index 52d7ea429..e24691b8a 100644
|
||||
index 6d506c85306..9940e6cf7c9 100644
|
||||
--- a/dlls/ntdll/process.c
|
||||
+++ b/dlls/ntdll/process.c
|
||||
@@ -125,6 +125,24 @@ HANDLE CDECL __wine_make_process_system(void)
|
||||
@@ -124,6 +124,24 @@ HANDLE CDECL __wine_make_process_system(void)
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -71,10 +71,10 @@ index 52d7ea429..e24691b8a 100644
|
||||
|
||||
#define UNIMPLEMENTED_INFO_CLASS(c) \
|
||||
diff --git a/server/protocol.def b/server/protocol.def
|
||||
index e908f2131..0177cb579 100644
|
||||
index efacadac42b..434cd11baf0 100644
|
||||
--- a/server/protocol.def
|
||||
+++ b/server/protocol.def
|
||||
@@ -3734,6 +3734,14 @@ struct handle_info
|
||||
@@ -3749,6 +3749,14 @@ struct handle_info
|
||||
@END
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ index e908f2131..0177cb579 100644
|
||||
@REQ(create_completion)
|
||||
unsigned int access; /* desired access to a port */
|
||||
diff --git a/server/security.h b/server/security.h
|
||||
index 6c337143c..21e90ccf2 100644
|
||||
index 6c337143c3d..21e90ccf23f 100644
|
||||
--- a/server/security.h
|
||||
+++ b/server/security.h
|
||||
@@ -49,6 +49,7 @@ extern const PSID security_builtin_users_sid;
|
||||
@@ -102,10 +102,10 @@ index 6c337143c..21e90ccf2 100644
|
||||
|
||||
/* token functions */
|
||||
diff --git a/server/token.c b/server/token.c
|
||||
index 381ae6871..fcab79955 100644
|
||||
index c4f1cd943c2..970ed1838da 100644
|
||||
--- a/server/token.c
|
||||
+++ b/server/token.c
|
||||
@@ -79,6 +79,7 @@ static const SID anonymous_logon_sid = { SID_REVISION, 1, { SECURITY_NT_AUTHORIT
|
||||
@@ -77,6 +77,7 @@ static const SID anonymous_logon_sid = { SID_REVISION, 1, { SECURITY_NT_AUTHORIT
|
||||
static const SID authenticated_user_sid = { SID_REVISION, 1, { SECURITY_NT_AUTHORITY }, { SECURITY_AUTHENTICATED_USER_RID } };
|
||||
static const SID local_system_sid = { SID_REVISION, 1, { SECURITY_NT_AUTHORITY }, { SECURITY_LOCAL_SYSTEM_RID } };
|
||||
static const SID high_label_sid = { SID_REVISION, 1, { SECURITY_MANDATORY_LABEL_AUTHORITY }, { SECURITY_MANDATORY_HIGH_RID } };
|
||||
@@ -113,7 +113,7 @@ index 381ae6871..fcab79955 100644
|
||||
static const SID_N(5) local_user_sid = { SID_REVISION, 5, { SECURITY_NT_AUTHORITY }, { SECURITY_NT_NON_UNIQUE, 0, 0, 0, 1000 } };
|
||||
static const SID_N(2) builtin_admins_sid = { SID_REVISION, 2, { SECURITY_NT_AUTHORITY }, { SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_ADMINS } };
|
||||
static const SID_N(2) builtin_users_sid = { SID_REVISION, 2, { SECURITY_NT_AUTHORITY }, { SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_USERS } };
|
||||
@@ -95,6 +96,7 @@ const PSID security_builtin_admins_sid = (PSID)&builtin_admins_sid;
|
||||
@@ -93,6 +94,7 @@ const PSID security_builtin_admins_sid = (PSID)&builtin_admins_sid;
|
||||
const PSID security_builtin_users_sid = (PSID)&builtin_users_sid;
|
||||
const PSID security_domain_users_sid = (PSID)&domain_users_sid;
|
||||
const PSID security_high_label_sid = (PSID)&high_label_sid;
|
||||
@@ -121,7 +121,7 @@ index 381ae6871..fcab79955 100644
|
||||
|
||||
static luid_t prev_luid_value = { 1000, 0 };
|
||||
|
||||
@@ -917,6 +919,64 @@ struct token *token_create_admin( void )
|
||||
@@ -915,6 +917,64 @@ struct token *token_create_admin( void )
|
||||
return token;
|
||||
}
|
||||
|
||||
@@ -186,7 +186,7 @@ index 381ae6871..fcab79955 100644
|
||||
static struct privilege *token_find_privilege( struct token *token, const LUID *luid, int enabled_only )
|
||||
{
|
||||
struct privilege *privilege;
|
||||
@@ -1722,3 +1782,27 @@ DECL_HANDLER(set_token_default_dacl)
|
||||
@@ -1720,3 +1780,27 @@ DECL_HANDLER(set_token_default_dacl)
|
||||
release_object( token );
|
||||
}
|
||||
}
|
||||
@@ -215,5 +215,5 @@ index 381ae6871..fcab79955 100644
|
||||
+ }
|
||||
+}
|
||||
--
|
||||
2.23.0
|
||||
2.26.0
|
||||
|
||||
|
@@ -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;
|
||||
+}
|
||||
+
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From ad23e816eb724d81032306f8ac6d4faa96ccaf4a Mon Sep 17 00:00:00 2001
|
||||
From c88a1acf9ac625cb2a7cbfc90ac3bb2d426889a0 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Tue, 12 Nov 2019 18:13:20 +0800
|
||||
Subject: [PATCH] comctl32: Bump version to 6.0.
|
||||
@@ -14,12 +14,12 @@ Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
3 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/comctl32/comctl32.h b/dlls/comctl32/comctl32.h
|
||||
index 78e97983381..42b434a96d9 100644
|
||||
index 66b341ae5ad..1af9baea7ee 100644
|
||||
--- a/dlls/comctl32/comctl32.h
|
||||
+++ b/dlls/comctl32/comctl32.h
|
||||
@@ -192,7 +192,7 @@ INT Str_GetPtrAtoW (LPCSTR lpSrc, LPWSTR lpDest, INT nMaxLen) DECLSPEC_HIDDEN;
|
||||
BOOL Str_SetPtrAtoW (LPWSTR *lppDest, LPCSTR lpSrc) DECLSPEC_HIDDEN;
|
||||
@@ -193,7 +193,7 @@ BOOL Str_SetPtrAtoW (LPWSTR *lppDest, LPCSTR lpSrc) DECLSPEC_HIDDEN;
|
||||
BOOL Str_SetPtrWtoA (LPSTR *lppDest, LPCWSTR lpSrc) DECLSPEC_HIDDEN;
|
||||
BOOL imagelist_has_alpha(HIMAGELIST, UINT) DECLSPEC_HIDDEN;
|
||||
|
||||
-#define COMCTL32_VERSION_MINOR 81
|
||||
+#define COMCTL32_VERSION_MINOR 0
|
||||
@@ -40,7 +40,7 @@ index c9aa1ba6253..be6e2425193 100644
|
||||
#define WINE_PRODUCTVERSION_STR WINE_FILEVERSION_STR
|
||||
|
||||
diff --git a/include/commctrl.h b/include/commctrl.h
|
||||
index 700b335fbb7..029a4b45457 100644
|
||||
index dfd2f4a37d2..0784478ce14 100644
|
||||
--- a/include/commctrl.h
|
||||
+++ b/include/commctrl.h
|
||||
@@ -51,7 +51,7 @@ enum _LI_METRIC
|
||||
@@ -50,8 +50,8 @@ index 700b335fbb7..029a4b45457 100644
|
||||
-#define COMCTL32_VERSION 5 /* dll version */
|
||||
+#define COMCTL32_VERSION 6 /* dll version */
|
||||
|
||||
#ifndef _WIN32_IE
|
||||
#define _WIN32_IE 0x0400
|
||||
#define ICC_LISTVIEW_CLASSES 0x00000001 /* listview, header */
|
||||
#define ICC_TREEVIEW_CLASSES 0x00000002 /* treeview, tooltips */
|
||||
--
|
||||
2.24.1
|
||||
2.25.1
|
||||
|
||||
|
@@ -1,316 +0,0 @@
|
||||
From 4693069d7c35e2c186943b2394ab4a657253c5e1 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Costa <titan.costa@gmail.com>
|
||||
Date: Sun, 26 May 2013 19:42:08 +0200
|
||||
Subject: [PATCH] d3dx9_36: Implement ID3DXFontImpl_DrawText.
|
||||
|
||||
Changes by Sebastian Lackner <sebastian@fds-team.de>:
|
||||
* Use pitch value for locked buffer instead of assuming that pitch = width * bytesperpixel
|
||||
* Avoid one for loop to simplify code
|
||||
* Ensure that DrawText doesn't dereference a NULL pointer when count != 0.
|
||||
|
||||
Changes by Christian Costa <titan.costa@gmail.com>
|
||||
* Use dedicated variables for text width & height instead of reusing rect.right and rect.bottom
|
||||
* Remove useless test in pixel conversion
|
||||
* Remove left over 'partial stub' in fixme
|
||||
|
||||
Changes by Sebastian Lackner <sebastian@fds-team.de>:
|
||||
* Replace code to convert text from ascii to widechar
|
||||
* Strip terminating NULL chars before drawing text
|
||||
---
|
||||
dlls/d3dx9_36/font.c | 214 +++++++++++++++++++++++++++++++++++++++----
|
||||
1 file changed, 195 insertions(+), 19 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3dx9_36/font.c b/dlls/d3dx9_36/font.c
|
||||
index cb09af22f57..89a60c9baf1 100644
|
||||
--- a/dlls/d3dx9_36/font.c
|
||||
+++ b/dlls/d3dx9_36/font.c
|
||||
@@ -32,6 +32,12 @@ struct d3dx_font
|
||||
|
||||
HDC hdc;
|
||||
HFONT hfont;
|
||||
+
|
||||
+ UINT tex_width;
|
||||
+ UINT tex_height;
|
||||
+ IDirect3DTexture9 *texture;
|
||||
+ HBITMAP bitmap;
|
||||
+ BYTE *bits;
|
||||
};
|
||||
|
||||
static inline struct d3dx_font *impl_from_ID3DXFont(ID3DXFont *iface)
|
||||
@@ -60,19 +66,27 @@ static HRESULT WINAPI ID3DXFontImpl_QueryInterface(ID3DXFont *iface, REFIID riid
|
||||
static ULONG WINAPI ID3DXFontImpl_AddRef(ID3DXFont *iface)
|
||||
{
|
||||
struct d3dx_font *This = impl_from_ID3DXFont(iface);
|
||||
- ULONG ref=InterlockedIncrement(&This->ref);
|
||||
+ ULONG ref = InterlockedIncrement(&This->ref);
|
||||
+
|
||||
TRACE("%p increasing refcount to %u\n", iface, ref);
|
||||
+
|
||||
return ref;
|
||||
}
|
||||
|
||||
static ULONG WINAPI ID3DXFontImpl_Release(ID3DXFont *iface)
|
||||
{
|
||||
struct d3dx_font *This = impl_from_ID3DXFont(iface);
|
||||
- ULONG ref=InterlockedDecrement(&This->ref);
|
||||
+ ULONG ref = InterlockedDecrement(&This->ref);
|
||||
|
||||
TRACE("%p decreasing refcount to %u\n", iface, ref);
|
||||
|
||||
- if(ref==0) {
|
||||
+ if (!ref)
|
||||
+ {
|
||||
+ if (This->texture)
|
||||
+ {
|
||||
+ IDirect3DTexture9_Release(This->texture);
|
||||
+ DeleteObject(This->bitmap);
|
||||
+ }
|
||||
DeleteObject(This->hfont);
|
||||
DeleteDC(This->hdc);
|
||||
IDirect3DDevice9_Release(This->device);
|
||||
@@ -175,17 +189,170 @@ static HRESULT WINAPI ID3DXFontImpl_PreloadTextW(ID3DXFont *iface, const WCHAR *
|
||||
static INT WINAPI ID3DXFontImpl_DrawTextA(ID3DXFont *iface, ID3DXSprite *sprite,
|
||||
const char *string, INT count, RECT *rect, DWORD format, D3DCOLOR color)
|
||||
{
|
||||
- FIXME("iface %p, sprite %p, string %s, count %d, rect %s, format %#x, color 0x%08x stub!\n",
|
||||
+ LPWSTR stringW;
|
||||
+ INT countW, ret = 0;
|
||||
+
|
||||
+ TRACE("iface %p, sprite %p, string %s, count %d, rect %s, format %#x, color 0x%08x\n",
|
||||
iface, sprite, debugstr_a(string), count, wine_dbgstr_rect(rect), format, color);
|
||||
- return 1;
|
||||
+
|
||||
+ if (!string || count <= 0)
|
||||
+ return 0;
|
||||
+
|
||||
+ countW = MultiByteToWideChar(CP_ACP, 0, string, count, NULL, 0);
|
||||
+ stringW = HeapAlloc(GetProcessHeap(), 0, countW * sizeof(WCHAR));
|
||||
+ if (stringW)
|
||||
+ {
|
||||
+ MultiByteToWideChar(CP_ACP, 0, string, count, stringW, countW);
|
||||
+ ret = ID3DXFont_DrawTextW(iface, sprite, stringW, countW, rect, format, color);
|
||||
+ HeapFree(GetProcessHeap(), 0, stringW);
|
||||
+ }
|
||||
+
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
static INT WINAPI ID3DXFontImpl_DrawTextW(ID3DXFont *iface, ID3DXSprite *sprite,
|
||||
const WCHAR *string, INT count, RECT *rect, DWORD format, D3DCOLOR color)
|
||||
{
|
||||
- FIXME("iface %p, sprite %p, string %s, count %d, rect %s, format %#x, color 0x%08x stub!\n",
|
||||
+ struct d3dx_font *This = impl_from_ID3DXFont(iface);
|
||||
+ RECT calc_rect = *rect;
|
||||
+ INT height;
|
||||
+
|
||||
+ TRACE("iface %p, sprite %p, string %s, count %d, rect %s, format %#x, color 0x%08x\n",
|
||||
iface, sprite, debugstr_w(string), count, wine_dbgstr_rect(rect), format, color);
|
||||
- return 1;
|
||||
+
|
||||
+ if (!string || count <= 0)
|
||||
+ return 0;
|
||||
+
|
||||
+ /* Strip terminating NULL characters */
|
||||
+ while (count > 0 && !string[count-1])
|
||||
+ count--;
|
||||
+
|
||||
+ height = DrawTextW(This->hdc, string, count, &calc_rect, format | DT_CALCRECT);
|
||||
+
|
||||
+ if (format & DT_CALCRECT)
|
||||
+ {
|
||||
+ *rect = calc_rect;
|
||||
+ return height;
|
||||
+ }
|
||||
+
|
||||
+ if (height && (calc_rect.left < calc_rect.right))
|
||||
+ {
|
||||
+ D3DLOCKED_RECT locked_rect;
|
||||
+ D3DXVECTOR3 position;
|
||||
+ UINT text_width, text_height;
|
||||
+ RECT text_rect;
|
||||
+ ID3DXSprite *target = sprite;
|
||||
+ HRESULT hr;
|
||||
+ int i, j;
|
||||
+
|
||||
+ /* Get rect position and dimensions */
|
||||
+ position.x = calc_rect.left;
|
||||
+ position.y = calc_rect.top;
|
||||
+ position.z = 0;
|
||||
+ text_width = calc_rect.right - calc_rect.left;
|
||||
+ text_height = calc_rect.bottom - calc_rect.top;
|
||||
+ text_rect.left = 0;
|
||||
+ text_rect.top = 0;
|
||||
+ text_rect.right = text_width;
|
||||
+ text_rect.bottom = text_height;
|
||||
+
|
||||
+ /* We need to flush as it seems all draws in the begin/end sequence use only the latest updated texture */
|
||||
+ if (sprite)
|
||||
+ ID3DXSprite_Flush(sprite);
|
||||
+
|
||||
+ /* Extend texture and DIB section to contain text */
|
||||
+ if ((text_width > This->tex_width) || (text_height > This->tex_height))
|
||||
+ {
|
||||
+ BITMAPINFOHEADER header;
|
||||
+
|
||||
+ if (text_width > This->tex_width)
|
||||
+ This->tex_width = make_pow2(text_width);
|
||||
+ if (text_height > This->tex_height)
|
||||
+ This->tex_height = make_pow2(text_height);
|
||||
+
|
||||
+ if (This->texture)
|
||||
+ {
|
||||
+ IDirect3DTexture9_Release(This->texture);
|
||||
+ DeleteObject(This->bitmap);
|
||||
+ }
|
||||
+
|
||||
+ hr = D3DXCreateTexture(This->device, This->tex_width, This->tex_height, 1, D3DUSAGE_DYNAMIC,
|
||||
+ D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &This->texture);
|
||||
+ if (FAILED(hr))
|
||||
+ {
|
||||
+ This->texture = NULL;
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ header.biSize = sizeof(header);
|
||||
+ header.biWidth = This->tex_width;
|
||||
+ header.biHeight = -This->tex_height;
|
||||
+ header.biPlanes = 1;
|
||||
+ header.biBitCount = 32;
|
||||
+ header.biCompression = BI_RGB;
|
||||
+ header.biSizeImage = sizeof(DWORD) * This->tex_width * This->tex_height;
|
||||
+ header.biXPelsPerMeter = 0;
|
||||
+ header.biYPelsPerMeter = 0;
|
||||
+ header.biClrUsed = 0;
|
||||
+ header.biClrImportant = 0;
|
||||
+
|
||||
+ This->bitmap = CreateDIBSection(This->hdc, (const BITMAPINFO*)&header,
|
||||
+ DIB_RGB_COLORS, (void**)&This->bits, NULL, 0);
|
||||
+ if (!This->bitmap)
|
||||
+ {
|
||||
+ IDirect3DTexture9_Release(This->texture);
|
||||
+ This->texture = NULL;
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ SelectObject(This->hdc, This->bitmap);
|
||||
+ }
|
||||
+
|
||||
+ if (FAILED(IDirect3DTexture9_LockRect(This->texture, 0, &locked_rect, &text_rect, D3DLOCK_DISCARD)))
|
||||
+ return 0;
|
||||
+
|
||||
+ /* Clear rect */
|
||||
+ for (i = 0; i < text_height; i++)
|
||||
+ memset(This->bits + i * This->tex_width * sizeof(DWORD), 0,
|
||||
+ text_width * sizeof(DWORD));
|
||||
+
|
||||
+ DrawTextW(This->hdc, string, count, &text_rect, format);
|
||||
+
|
||||
+ /* All RGB components are equal so take one as alpha and set RGB
|
||||
+ * color to white, so it can be modulated with color parameter */
|
||||
+ for (i = 0; i < text_height; i++)
|
||||
+ {
|
||||
+ DWORD *src = (DWORD *)This->bits + i * This->tex_width;
|
||||
+ DWORD *dst = (DWORD *)((BYTE *)locked_rect.pBits + i * locked_rect.Pitch);
|
||||
+ for (j = 0; j < text_width; j++)
|
||||
+ {
|
||||
+ *dst++ = (*src++ << 24) | 0xFFFFFF;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ IDirect3DTexture9_UnlockRect(This->texture, 0);
|
||||
+
|
||||
+ if (!sprite)
|
||||
+ {
|
||||
+ hr = D3DXCreateSprite(This->device, &target);
|
||||
+ if (FAILED(hr))
|
||||
+ return 0;
|
||||
+ ID3DXSprite_Begin(target, 0);
|
||||
+ }
|
||||
+
|
||||
+ hr = target->lpVtbl->Draw(target, This->texture, &text_rect, NULL, &position, color);
|
||||
+
|
||||
+ if (!sprite)
|
||||
+ {
|
||||
+ ID3DXSprite_End(target);
|
||||
+ ID3DXSprite_Release(target);
|
||||
+ }
|
||||
+
|
||||
+ if (FAILED(hr))
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ return height;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ID3DXFontImpl_OnLostDevice(ID3DXFont *iface)
|
||||
@@ -298,46 +465,55 @@ HRESULT WINAPI D3DXCreateFontIndirectW(IDirect3DDevice9 *device, const D3DXFONT_
|
||||
|
||||
TRACE("(%p, %p, %p)\n", device, desc, font);
|
||||
|
||||
- if( !device || !desc || !font ) return D3DERR_INVALIDCALL;
|
||||
+ if (!device || !desc || !font) return D3DERR_INVALIDCALL;
|
||||
|
||||
- /* the device MUST support D3DFMT_A8R8G8B8 */
|
||||
+ TRACE("desc: %d %d %d %d %d %d %d %d %d %s\n", desc->Height, desc->Width, desc->Weight, desc->MipLevels, desc->Italic,
|
||||
+ desc->CharSet, desc->OutputPrecision, desc->Quality, desc->PitchAndFamily, debugstr_w(desc->FaceName));
|
||||
+
|
||||
+ /* The device MUST support D3DFMT_A8R8G8B8 */
|
||||
IDirect3DDevice9_GetDirect3D(device, &d3d);
|
||||
IDirect3DDevice9_GetCreationParameters(device, &cpars);
|
||||
IDirect3DDevice9_GetDisplayMode(device, 0, &mode);
|
||||
hr = IDirect3D9_CheckDeviceFormat(d3d, cpars.AdapterOrdinal, cpars.DeviceType, mode.Format, 0, D3DRTYPE_TEXTURE, D3DFMT_A8R8G8B8);
|
||||
- if(FAILED(hr)) {
|
||||
+ if (FAILED(hr))
|
||||
+ {
|
||||
IDirect3D9_Release(d3d);
|
||||
return D3DXERR_INVALIDDATA;
|
||||
}
|
||||
IDirect3D9_Release(d3d);
|
||||
|
||||
- object = HeapAlloc(GetProcessHeap(), 0, sizeof(struct d3dx_font));
|
||||
- if(object==NULL) {
|
||||
- *font=NULL;
|
||||
+ object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(struct d3dx_font));
|
||||
+ if (!object)
|
||||
+ {
|
||||
+ *font = NULL;
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
object->ID3DXFont_iface.lpVtbl = &D3DXFont_Vtbl;
|
||||
- object->ref=1;
|
||||
- object->device=device;
|
||||
- object->desc=*desc;
|
||||
+ object->ref = 1;
|
||||
+ object->device = device;
|
||||
+ object->desc = *desc;
|
||||
|
||||
object->hdc = CreateCompatibleDC(NULL);
|
||||
- if( !object->hdc ) {
|
||||
+ if (!object->hdc)
|
||||
+ {
|
||||
HeapFree(GetProcessHeap(), 0, object);
|
||||
return D3DXERR_INVALIDDATA;
|
||||
}
|
||||
|
||||
object->hfont = CreateFontW(desc->Height, desc->Width, 0, 0, desc->Weight, desc->Italic, FALSE, FALSE, desc->CharSet,
|
||||
desc->OutputPrecision, CLIP_DEFAULT_PRECIS, desc->Quality, desc->PitchAndFamily, desc->FaceName);
|
||||
- if( !object->hfont ) {
|
||||
+ if (!object->hfont)
|
||||
+ {
|
||||
DeleteDC(object->hdc);
|
||||
HeapFree(GetProcessHeap(), 0, object);
|
||||
return D3DXERR_INVALIDDATA;
|
||||
}
|
||||
SelectObject(object->hdc, object->hfont);
|
||||
+ SetTextColor(object->hdc, 0x00ffffff);
|
||||
+ SetBkColor(object->hdc, 0x00000000);
|
||||
|
||||
IDirect3DDevice9_AddRef(device);
|
||||
- *font=&object->ID3DXFont_iface;
|
||||
+ *font = &object->ID3DXFont_iface;
|
||||
|
||||
return D3D_OK;
|
||||
}
|
||||
--
|
||||
2.25.0
|
||||
|
@@ -1,32 +0,0 @@
|
||||
From 93b91dc6b0ccaf6c9babab7adb218454df93b750 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Costa <titan.costa@gmail.com>
|
||||
Date: Sun, 4 Jan 2015 18:43:42 +0100
|
||||
Subject: d3dx9_36: Fix horizontal centering in ID3DXFont_DrawText.
|
||||
|
||||
Fix remaining text issues in Air Strike.
|
||||
Should fix text placement in Stronghold Kingdoms.
|
||||
---
|
||||
dlls/d3dx9_36/font.c | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/dlls/d3dx9_36/font.c b/dlls/d3dx9_36/font.c
|
||||
index 368c784..fa52859 100644
|
||||
--- a/dlls/d3dx9_36/font.c
|
||||
+++ b/dlls/d3dx9_36/font.c
|
||||
@@ -254,6 +254,13 @@ static INT WINAPI ID3DXFontImpl_DrawTextW(ID3DXFont *iface, ID3DXSprite *sprite,
|
||||
return height;
|
||||
}
|
||||
|
||||
+ if (format & DT_CENTER)
|
||||
+ {
|
||||
+ UINT new_width = calc_rect.right - calc_rect.left;
|
||||
+ calc_rect.left = (rect->right + rect->left - new_width) / 2;
|
||||
+ calc_rect.right = calc_rect.left + new_width;
|
||||
+ }
|
||||
+
|
||||
if (height && (calc_rect.left < calc_rect.right))
|
||||
{
|
||||
D3DLOCKED_RECT locked_rect;
|
||||
--
|
||||
2.2.1
|
||||
|
@@ -1,47 +0,0 @@
|
||||
From 0b6fc918564f580a9d62f14d76da83349075574f Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Fri, 4 Dec 2015 09:22:35 +1100
|
||||
Subject: [PATCH] d3dx9_36: Support NULL terminated strings in
|
||||
ID3DXFont_DrawText
|
||||
|
||||
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
---
|
||||
dlls/d3dx9_36/font.c | 10 ++++++++--
|
||||
dlls/d3dx9_36/tests/core.c | 1 -
|
||||
2 files changed, 8 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3dx9_36/font.c b/dlls/d3dx9_36/font.c
|
||||
index ad1eb2383e4..83fec560fc5 100644
|
||||
--- a/dlls/d3dx9_36/font.c
|
||||
+++ b/dlls/d3dx9_36/font.c
|
||||
@@ -210,9 +210,12 @@ static INT WINAPI ID3DXFontImpl_DrawTextA(ID3DXFont *iface, ID3DXSprite *sprite,
|
||||
TRACE("iface %p, sprite %p, string %s, count %d, rect %s, format %#x, color 0x%08x\n",
|
||||
iface, sprite, debugstr_a(string), count, wine_dbgstr_rect(rect), format, color);
|
||||
|
||||
- if (!string || count <= 0)
|
||||
+ if (!string || count == 0)
|
||||
return 0;
|
||||
|
||||
+ if (count < 0)
|
||||
+ count = -1;
|
||||
+
|
||||
countW = MultiByteToWideChar(CP_ACP, 0, string, count, NULL, 0);
|
||||
stringW = HeapAlloc(GetProcessHeap(), 0, countW * sizeof(WCHAR));
|
||||
if (stringW)
|
||||
@@ -235,9 +238,12 @@ static INT WINAPI ID3DXFontImpl_DrawTextW(ID3DXFont *iface, ID3DXSprite *sprite,
|
||||
TRACE("iface %p, sprite %p, string %s, count %d, rect %s, format %#x, color 0x%08x\n",
|
||||
iface, sprite, debugstr_w(string), count, wine_dbgstr_rect(rect), format, color);
|
||||
|
||||
- if (!string || count <= 0)
|
||||
+ if (!string || count == 0)
|
||||
return 0;
|
||||
|
||||
+ if (count < 0)
|
||||
+ count = lstrlenW(string);
|
||||
+
|
||||
/* Strip terminating NULL characters */
|
||||
while (count > 0 && !string[count-1])
|
||||
count--;
|
||||
--
|
||||
2.17.1
|
||||
|
@@ -1,43 +0,0 @@
|
||||
From ccf7cfe0cd7cbaa15ee34b4390dd6c30cf7e84ec Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Sat, 5 Dec 2015 15:31:06 +1100
|
||||
Subject: [PATCH] d3dx9_36: ID3DXFont_DrawText calc_rect can be null
|
||||
|
||||
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
---
|
||||
dlls/d3dx9_36/font.c | 8 ++++++--
|
||||
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3dx9_36/font.c b/dlls/d3dx9_36/font.c
|
||||
index 83fec560fc5..f5c704ebabb 100644
|
||||
--- a/dlls/d3dx9_36/font.c
|
||||
+++ b/dlls/d3dx9_36/font.c
|
||||
@@ -232,7 +232,7 @@ static INT WINAPI ID3DXFontImpl_DrawTextW(ID3DXFont *iface, ID3DXSprite *sprite,
|
||||
const WCHAR *string, INT count, RECT *rect, DWORD format, D3DCOLOR color)
|
||||
{
|
||||
struct d3dx_font *This = impl_from_ID3DXFont(iface);
|
||||
- RECT calc_rect = *rect;
|
||||
+ RECT calc_rect;
|
||||
INT height;
|
||||
|
||||
TRACE("iface %p, sprite %p, string %s, count %d, rect %s, format %#x, color 0x%08x\n",
|
||||
@@ -248,11 +248,15 @@ static INT WINAPI ID3DXFontImpl_DrawTextW(ID3DXFont *iface, ID3DXSprite *sprite,
|
||||
while (count > 0 && !string[count-1])
|
||||
count--;
|
||||
|
||||
+ if (rect)
|
||||
+ calc_rect = *rect;
|
||||
+
|
||||
height = DrawTextW(This->hdc, string, count, &calc_rect, format | DT_CALCRECT);
|
||||
|
||||
if (format & DT_CALCRECT)
|
||||
{
|
||||
- *rect = calc_rect;
|
||||
+ if (rect)
|
||||
+ *rect = calc_rect;
|
||||
return height;
|
||||
}
|
||||
|
||||
--
|
||||
2.17.1
|
||||
|
@@ -1,3 +0,0 @@
|
||||
Fixes: [24754] Support for ID3DXFont::DrawTextA/W
|
||||
#Disabled since it's in the process of being upstreamed.
|
||||
Disabled: true
|
@@ -1,15 +1,15 @@
|
||||
From e920f461eaf4c5d19c0cfc8e9c9a40671269dd93 Mon Sep 17 00:00:00 2001
|
||||
From b17741a716e2633c02c2237eb424f126860a0c39 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Mon, 6 Oct 2014 05:06:06 +0200
|
||||
Subject: [PATCH] dbghelp: Always check for debug symbols in BINDIR.
|
||||
|
||||
---
|
||||
dlls/dbghelp/Makefile.in | 2 +-
|
||||
dlls/dbghelp/elf_module.c | 8 +++++---
|
||||
2 files changed, 6 insertions(+), 4 deletions(-)
|
||||
dlls/dbghelp/elf_module.c | 1 +
|
||||
2 files changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/dbghelp/Makefile.in b/dlls/dbghelp/Makefile.in
|
||||
index f08464cd422..aa7a767110b 100644
|
||||
index 076c50323dd..ddb69c96dd4 100644
|
||||
--- a/dlls/dbghelp/Makefile.in
|
||||
+++ b/dlls/dbghelp/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
@@ -18,27 +18,20 @@ index f08464cd422..aa7a767110b 100644
|
||||
-EXTRADEFS = -D_IMAGEHLP_SOURCE_
|
||||
+EXTRADEFS = -D_IMAGEHLP_SOURCE_ -DBINDIR="\"${bindir}\""
|
||||
DELAYIMPORTS = version
|
||||
EXTRAINCL = $(Z_CFLAGS)
|
||||
EXTRALIBS = $(Z_LIBS) $(CORESERVICES_LIBS) $(COREFOUNDATION_LIBS)
|
||||
|
||||
EXTRADLLFLAGS = -mno-cygwin
|
||||
diff --git a/dlls/dbghelp/elf_module.c b/dlls/dbghelp/elf_module.c
|
||||
index 96b16fd5c0c..611533ee098 100644
|
||||
index ab2a693ecaf..2add1025e39 100644
|
||||
--- a/dlls/dbghelp/elf_module.c
|
||||
+++ b/dlls/dbghelp/elf_module.c
|
||||
@@ -1644,9 +1644,11 @@ static BOOL elf_search_and_load_file(struct process* pcs, const WCHAR* filename,
|
||||
if (!ret && !strchrW(filename, '/'))
|
||||
{
|
||||
ret = elf_load_file_from_path(pcs, filename, load_offset, dyn_addr,
|
||||
- getenv("PATH"), elf_info) ||
|
||||
- elf_load_file_from_path(pcs, filename, load_offset, dyn_addr,
|
||||
- getenv("LD_LIBRARY_PATH"), elf_info);
|
||||
+ getenv("PATH"), elf_info);
|
||||
+ if (!ret) ret = elf_load_file_from_path(pcs, filename, load_offset, dyn_addr,
|
||||
+ getenv("LD_LIBRARY_PATH"), elf_info);
|
||||
+ if (!ret) ret = elf_load_file_from_path(pcs, filename, load_offset, dyn_addr,
|
||||
+ BINDIR, elf_info);
|
||||
if (!ret) ret = elf_load_file_from_dll_path(pcs, filename,
|
||||
load_offset, dyn_addr, elf_info);
|
||||
@@ -1436,6 +1436,7 @@ static BOOL elf_search_and_load_file(struct process* pcs, const WCHAR* filename,
|
||||
load_elf.elf_info = elf_info;
|
||||
|
||||
ret = search_unix_path(filename, getenv("LD_LIBRARY_PATH"), elf_load_file_cb, &load_elf)
|
||||
+ || search_unix_path(filename, BINDIR, elf_load_file_cb, &load_elf)
|
||||
|| search_dll_path(pcs, filename, elf_load_file_cb, &load_elf);
|
||||
}
|
||||
|
||||
--
|
||||
2.20.1
|
||||
2.26.0
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From da87296baa62ed82f5334236ef9b259aac818e5d Mon Sep 17 00:00:00 2001
|
||||
From 2097fbe83a66a3a423bdd148ecfc4f16c1237110 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Wed, 29 Jul 2015 17:09:50 +0200
|
||||
Subject: [PATCH] ddraw: Create rendering targets in video memory if possible.
|
||||
@@ -12,10 +12,10 @@ Based on a patch by Henri Verbeet.
|
||||
4 files changed, 56 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c
|
||||
index 535f33f1c7d..00fd337ead4 100644
|
||||
index 050f625f7..9655f9e47 100644
|
||||
--- a/dlls/ddraw/ddraw.c
|
||||
+++ b/dlls/ddraw/ddraw.c
|
||||
@@ -4298,7 +4298,7 @@ static HRESULT WINAPI d3d7_CreateDevice(IDirect3D7 *iface, REFCLSID riid,
|
||||
@@ -4214,7 +4214,7 @@ static HRESULT WINAPI d3d7_CreateDevice(IDirect3D7 *iface, REFCLSID riid,
|
||||
TRACE("iface %p, riid %s, surface %p, device %p.\n", iface, debugstr_guid(riid), surface, device);
|
||||
|
||||
wined3d_mutex_lock();
|
||||
@@ -24,7 +24,7 @@ index 535f33f1c7d..00fd337ead4 100644
|
||||
{
|
||||
*device = &object->IDirect3DDevice7_iface;
|
||||
}
|
||||
@@ -4327,7 +4327,7 @@ static HRESULT WINAPI d3d3_CreateDevice(IDirect3D3 *iface, REFCLSID riid,
|
||||
@@ -4243,7 +4243,7 @@ static HRESULT WINAPI d3d3_CreateDevice(IDirect3D3 *iface, REFCLSID riid,
|
||||
return CLASS_E_NOAGGREGATION;
|
||||
|
||||
wined3d_mutex_lock();
|
||||
@@ -33,7 +33,7 @@ index 535f33f1c7d..00fd337ead4 100644
|
||||
{
|
||||
*device = &device_impl->IDirect3DDevice3_iface;
|
||||
}
|
||||
@@ -4353,7 +4353,7 @@ static HRESULT WINAPI d3d2_CreateDevice(IDirect3D2 *iface, REFCLSID riid,
|
||||
@@ -4269,7 +4269,7 @@ static HRESULT WINAPI d3d2_CreateDevice(IDirect3D2 *iface, REFCLSID riid,
|
||||
iface, debugstr_guid(riid), surface, device);
|
||||
|
||||
wined3d_mutex_lock();
|
||||
@@ -43,10 +43,10 @@ index 535f33f1c7d..00fd337ead4 100644
|
||||
*device = &device_impl->IDirect3DDevice2_iface;
|
||||
}
|
||||
diff --git a/dlls/ddraw/ddraw_private.h b/dlls/ddraw/ddraw_private.h
|
||||
index 42a7a85e4ec..1a7e48fdffa 100644
|
||||
index f4fe970a6..ba0ec73d8 100644
|
||||
--- a/dlls/ddraw/ddraw_private.h
|
||||
+++ b/dlls/ddraw/ddraw_private.h
|
||||
@@ -310,6 +310,7 @@ struct d3d_device
|
||||
@@ -313,6 +313,7 @@ struct d3d_device
|
||||
IUnknown IUnknown_inner;
|
||||
LONG ref;
|
||||
UINT version;
|
||||
@@ -54,8 +54,8 @@ index 42a7a85e4ec..1a7e48fdffa 100644
|
||||
|
||||
IUnknown *outer_unknown;
|
||||
struct wined3d_device *wined3d_device;
|
||||
@@ -356,7 +357,7 @@ struct d3d_device
|
||||
struct wined3d_stateblock *recording, *state, *update_state;
|
||||
@@ -360,7 +361,7 @@ struct d3d_device
|
||||
const struct wined3d_stateblock_state *stateblock_state;
|
||||
};
|
||||
|
||||
-HRESULT d3d_device_create(struct ddraw *ddraw, struct ddraw_surface *target, IUnknown *rt_iface,
|
||||
@@ -64,10 +64,10 @@ index 42a7a85e4ec..1a7e48fdffa 100644
|
||||
enum wined3d_depth_buffer_type d3d_device_update_depth_stencil(struct d3d_device *device) DECLSPEC_HIDDEN;
|
||||
|
||||
diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c
|
||||
index 7acc8e0db0b..390d9a9040d 100644
|
||||
index 048ba7fba..ce74a0fb8 100644
|
||||
--- a/dlls/ddraw/device.c
|
||||
+++ b/dlls/ddraw/device.c
|
||||
@@ -1856,7 +1856,7 @@ static HRESULT d3d_device7_SetRenderTarget(IDirect3DDevice7 *iface,
|
||||
@@ -1858,7 +1858,7 @@ static HRESULT d3d_device7_SetRenderTarget(IDirect3DDevice7 *iface,
|
||||
return DDERR_INVALIDCAPS;
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ index 7acc8e0db0b..390d9a9040d 100644
|
||||
{
|
||||
WARN("Surface %p is not in video memory.\n", target_impl);
|
||||
wined3d_mutex_unlock();
|
||||
@@ -1932,7 +1932,7 @@ static HRESULT WINAPI d3d_device3_SetRenderTarget(IDirect3DDevice3 *iface,
|
||||
@@ -1934,7 +1934,7 @@ static HRESULT WINAPI d3d_device3_SetRenderTarget(IDirect3DDevice3 *iface,
|
||||
return DDERR_INVALIDPIXELFORMAT;
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ index 7acc8e0db0b..390d9a9040d 100644
|
||||
{
|
||||
WARN("Surface %p is not in video memory.\n", target_impl);
|
||||
IDirectDrawSurface4_AddRef(target);
|
||||
@@ -1981,7 +1981,7 @@ static HRESULT WINAPI d3d_device2_SetRenderTarget(IDirect3DDevice2 *iface,
|
||||
@@ -1983,7 +1983,7 @@ static HRESULT WINAPI d3d_device2_SetRenderTarget(IDirect3DDevice2 *iface,
|
||||
return DDERR_INVALIDPIXELFORMAT;
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ index 7acc8e0db0b..390d9a9040d 100644
|
||||
{
|
||||
WARN("Surface %p is not in video memory.\n", target_impl);
|
||||
IDirectDrawSurface_AddRef(target);
|
||||
@@ -6956,7 +6956,7 @@ static void ddraw_reset_viewport_state(struct ddraw *ddraw)
|
||||
@@ -6951,7 +6951,7 @@ static void ddraw_reset_viewport_state(struct ddraw *ddraw)
|
||||
wined3d_stateblock_set_scissor_rect(ddraw->state, &rect);
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ index 7acc8e0db0b..390d9a9040d 100644
|
||||
struct ddraw_surface *target, IUnknown *rt_iface, UINT version, IUnknown *outer_unknown)
|
||||
{
|
||||
static const struct wined3d_matrix ident =
|
||||
@@ -6979,6 +6979,7 @@ static HRESULT d3d_device_init(struct d3d_device *device, struct ddraw *ddraw,
|
||||
@@ -6974,6 +6974,7 @@ static HRESULT d3d_device_init(struct d3d_device *device, struct ddraw *ddraw,
|
||||
device->IUnknown_inner.lpVtbl = &d3d_device_inner_vtbl;
|
||||
device->ref = 1;
|
||||
device->version = version;
|
||||
@@ -111,7 +111,7 @@ index 7acc8e0db0b..390d9a9040d 100644
|
||||
|
||||
if (outer_unknown)
|
||||
device->outer_unknown = outer_unknown;
|
||||
@@ -7036,14 +7037,18 @@ static HRESULT d3d_device_init(struct d3d_device *device, struct ddraw *ddraw,
|
||||
@@ -7032,14 +7033,18 @@ static HRESULT d3d_device_init(struct d3d_device *device, struct ddraw *ddraw,
|
||||
return D3D_OK;
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ index 7acc8e0db0b..390d9a9040d 100644
|
||||
|
||||
if (!(target->surface_desc.ddsCaps.dwCaps & DDSCAPS_3DDEVICE)
|
||||
|| (target->surface_desc.ddsCaps.dwCaps & DDSCAPS_ZBUFFER))
|
||||
@@ -7066,7 +7071,7 @@ HRESULT d3d_device_create(struct ddraw *ddraw, struct ddraw_surface *target, IUn
|
||||
@@ -7062,7 +7067,7 @@ HRESULT d3d_device_create(struct ddraw *ddraw, struct ddraw_surface *target, IUn
|
||||
return DDERR_OUTOFMEMORY;
|
||||
}
|
||||
|
||||
@@ -142,7 +142,7 @@ index 7acc8e0db0b..390d9a9040d 100644
|
||||
{
|
||||
WARN("Surface %p is not in video memory.\n", target);
|
||||
return D3DERR_SURFACENOTINVIDMEM;
|
||||
@@ -7084,7 +7089,7 @@ HRESULT d3d_device_create(struct ddraw *ddraw, struct ddraw_surface *target, IUn
|
||||
@@ -7080,7 +7085,7 @@ HRESULT d3d_device_create(struct ddraw *ddraw, struct ddraw_surface *target, IUn
|
||||
return DDERR_OUTOFMEMORY;
|
||||
}
|
||||
|
||||
@@ -152,7 +152,7 @@ index 7acc8e0db0b..390d9a9040d 100644
|
||||
WARN("Failed to initialize device, hr %#x.\n", hr);
|
||||
heap_free(object);
|
||||
diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c
|
||||
index da8913c521c..8b40e7de4b8 100644
|
||||
index 85c1ef496..01522f515 100644
|
||||
--- a/dlls/ddraw/surface.c
|
||||
+++ b/dlls/ddraw/surface.c
|
||||
@@ -223,7 +223,7 @@ static HRESULT WINAPI ddraw_surface7_QueryInterface(IDirectDrawSurface7 *iface,
|
||||
@@ -164,7 +164,7 @@ index da8913c521c..8b40e7de4b8 100644
|
||||
1, &This->device1, (IUnknown *)&This->IDirectDrawSurface_iface)))
|
||||
{
|
||||
This->device1 = NULL;
|
||||
@@ -6201,7 +6201,42 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_
|
||||
@@ -6192,7 +6192,42 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_
|
||||
|
||||
if (desc->ddsCaps.dwCaps & DDSCAPS_SYSTEMMEMORY)
|
||||
{
|
||||
@@ -196,7 +196,7 @@ index da8913c521c..8b40e7de4b8 100644
|
||||
+ * possible.
|
||||
+ */
|
||||
+ if (bind_flags
|
||||
+ && SUCCEEDED(hr = wined3d_check_device_format(ddraw->wined3d, WINED3DADAPTER_DEFAULT,
|
||||
+ && SUCCEEDED(hr = wined3d_check_device_format(ddraw->wined3d, ddraw->wined3d_adapter,
|
||||
+ WINED3D_DEVICE_TYPE_HAL, mode.format_id, 0,
|
||||
+ bind_flags, WINED3D_RTYPE_TEXTURE_2D, wined3d_desc.format)))
|
||||
+ {
|
||||
@@ -209,5 +209,5 @@ index da8913c521c..8b40e7de4b8 100644
|
||||
}
|
||||
else
|
||||
--
|
||||
2.25.0
|
||||
2.25.1
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 882c25ffe94d7e8869ed5a364120cf0c5f2ef241 Mon Sep 17 00:00:00 2001
|
||||
From a6f14f05fefc9510f673b47092cbc62a2366ccf9 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Gofman <gofmanp@gmail.com>
|
||||
Date: Thu, 4 Apr 2019 02:25:00 +0300
|
||||
Subject: [PATCH] ddraw: Allow setting texture without DDSCAPS_TEXTURE for
|
||||
@@ -6,26 +6,15 @@ Subject: [PATCH] ddraw: Allow setting texture without DDSCAPS_TEXTURE for
|
||||
|
||||
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
|
||||
---
|
||||
dlls/ddraw/device.c | 22 +++++--
|
||||
dlls/ddraw/device.c | 20 ++++--
|
||||
dlls/ddraw/tests/ddraw4.c | 128 +++++++++++++++++++++++++++++++++++++-
|
||||
2 files changed, 141 insertions(+), 9 deletions(-)
|
||||
2 files changed, 141 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c
|
||||
index e2643e6589..a43bca7a14 100644
|
||||
index 11e60f80c..324475303 100644
|
||||
--- a/dlls/ddraw/device.c
|
||||
+++ b/dlls/ddraw/device.c
|
||||
@@ -2921,10 +2921,8 @@ static HRESULT WINAPI d3d_device3_SetLightState(IDirect3DDevice3 *iface,
|
||||
wined3d_mutex_unlock();
|
||||
return DDERR_INVALIDPARAMS;
|
||||
}
|
||||
-
|
||||
material_activate(m);
|
||||
}
|
||||
-
|
||||
device->material = value;
|
||||
}
|
||||
else if (state == D3DLIGHTSTATE_COLORMODEL)
|
||||
@@ -4807,7 +4805,8 @@ static HRESULT d3d_device7_SetTexture(IDirect3DDevice7 *iface,
|
||||
@@ -4798,7 +4798,8 @@ static HRESULT d3d_device7_SetTexture(IDirect3DDevice7 *iface,
|
||||
struct ddraw_surface *surf = unsafe_impl_from_IDirectDrawSurface7(texture);
|
||||
struct wined3d_texture *wined3d_texture = NULL;
|
||||
|
||||
@@ -35,7 +24,7 @@ index e2643e6589..a43bca7a14 100644
|
||||
|
||||
if (surf && (surf->surface_desc.ddsCaps.dwCaps & DDSCAPS_TEXTURE))
|
||||
wined3d_texture = surf->wined3d_texture;
|
||||
@@ -4845,19 +4844,30 @@ static HRESULT WINAPI d3d_device3_SetTexture(IDirect3DDevice3 *iface,
|
||||
@@ -4834,19 +4835,30 @@ static HRESULT WINAPI d3d_device3_SetTexture(IDirect3DDevice3 *iface,
|
||||
{
|
||||
struct d3d_device *device = impl_from_IDirect3DDevice3(iface);
|
||||
struct ddraw_surface *tex = unsafe_impl_from_IDirect3DTexture2(texture);
|
||||
@@ -58,7 +47,7 @@ index e2643e6589..a43bca7a14 100644
|
||||
+ wined3d_texture = NULL;
|
||||
+ }
|
||||
+
|
||||
+ wined3d_device_set_texture(device->wined3d_device, stage, wined3d_texture);
|
||||
+ wined3d_stateblock_set_texture(device->state, stage, wined3d_texture);
|
||||
|
||||
fixup_texture_alpha_op(device);
|
||||
|
||||
@@ -70,7 +59,7 @@ index e2643e6589..a43bca7a14 100644
|
||||
|
||||
static const struct tss_lookup
|
||||
diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c
|
||||
index e3146ca45d..8861244e05 100644
|
||||
index e1d5bac18..e18f3c638 100644
|
||||
--- a/dlls/ddraw/tests/ddraw4.c
|
||||
+++ b/dlls/ddraw/tests/ddraw4.c
|
||||
@@ -330,7 +330,7 @@ static IDirectDraw4 *create_ddraw(void)
|
||||
@@ -132,7 +121,7 @@ index e3146ca45d..8861244e05 100644
|
||||
static IDirect3DViewport3 *create_viewport(IDirect3DDevice3 *device, UINT x, UINT y, UINT w, UINT h)
|
||||
{
|
||||
IDirect3DViewport3 *viewport;
|
||||
@@ -16819,6 +16830,116 @@ static void test_surface_format_conversion_alpha(void)
|
||||
@@ -16980,6 +16991,116 @@ static void test_surface_format_conversion_alpha(void)
|
||||
DestroyWindow(window);
|
||||
}
|
||||
|
||||
@@ -249,7 +238,7 @@ index e3146ca45d..8861244e05 100644
|
||||
START_TEST(ddraw4)
|
||||
{
|
||||
DDDEVICEIDENTIFIER identifier;
|
||||
@@ -16951,6 +17072,7 @@ START_TEST(ddraw4)
|
||||
@@ -17112,6 +17233,7 @@ START_TEST(ddraw4)
|
||||
test_gdi_surface();
|
||||
test_alphatest();
|
||||
test_clipper_refcount();
|
||||
@@ -258,5 +247,5 @@ index e3146ca45d..8861244e05 100644
|
||||
test_d32_support();
|
||||
test_surface_format_conversion_alpha();
|
||||
--
|
||||
2.17.1
|
||||
2.25.1
|
||||
|
||||
|
@@ -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?= <michael@fds-team.de>
|
||||
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
|
||||
|
||||
|
@@ -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?= <michael@fds-team.de>
|
||||
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
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 3c98dd79ccad72249122925b6b748c6ec84db003 Mon Sep 17 00:00:00 2001
|
||||
From e0719eabba7a7c187767441b361acedd50766234 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Wed, 13 Jun 2018 10:44:49 -0500
|
||||
Subject: [PATCH] configure: Check for sys/eventfd.h, ppoll(), and shm_open().
|
||||
@@ -11,18 +11,18 @@ Although perhaps we shouldn't since the server doesn't do this.
|
||||
1 file changed, 12 insertions(+)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 4f1c925bf95..662d510317a 100644
|
||||
index da5f24aba5f..6c2653c4c82 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -511,6 +511,7 @@ AC_CHECK_HEADERS(\
|
||||
sys/elf32.h \
|
||||
@@ -509,6 +509,7 @@ AC_CHECK_HEADERS(\
|
||||
sys/cdio.h \
|
||||
sys/epoll.h \
|
||||
sys/event.h \
|
||||
+ sys/eventfd.h \
|
||||
sys/exec_elf.h \
|
||||
sys/filio.h \
|
||||
sys/ioctl.h \
|
||||
@@ -2130,6 +2131,7 @@ AC_CHECK_FUNCS(\
|
||||
sys/ipc.h \
|
||||
@@ -2191,6 +2192,7 @@ AC_CHECK_FUNCS(\
|
||||
pipe2 \
|
||||
poll \
|
||||
port_create \
|
||||
@@ -30,7 +30,7 @@ index 4f1c925bf95..662d510317a 100644
|
||||
prctl \
|
||||
pread \
|
||||
proc_pidinfo \
|
||||
@@ -2204,6 +2206,16 @@ case $host_os in
|
||||
@@ -2265,6 +2267,16 @@ case $host_os in
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -48,5 +48,5 @@ index 4f1c925bf95..662d510317a 100644
|
||||
if test "x$with_ldap" != "xno"
|
||||
then
|
||||
--
|
||||
2.20.1
|
||||
2.25.1
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From d101cc56af09470319046d570891e861d0a6154a Mon Sep 17 00:00:00 2001
|
||||
From 2aba7f5090f92b609f6d2763603dbeb761f9c65a Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Thu, 7 Jun 2018 21:07:51 -0500
|
||||
Subject: [PATCH 06/83] ntdll: Close esync objects.
|
||||
Subject: [PATCH] ntdll: Close esync objects.
|
||||
|
||||
---
|
||||
dlls/ntdll/esync.c | 19 +++++++++++++++++++
|
||||
@@ -10,7 +10,7 @@ Subject: [PATCH 06/83] ntdll: Close esync objects.
|
||||
3 files changed, 24 insertions(+)
|
||||
|
||||
diff --git a/dlls/ntdll/esync.c b/dlls/ntdll/esync.c
|
||||
index bca95b9b2..f7a427425 100644
|
||||
index bca95b9b2d9..f7a427425b7 100644
|
||||
--- a/dlls/ntdll/esync.c
|
||||
+++ b/dlls/ntdll/esync.c
|
||||
@@ -136,6 +136,25 @@ static void *esync_get_object( HANDLE handle )
|
||||
@@ -40,7 +40,7 @@ index bca95b9b2..f7a427425 100644
|
||||
static NTSTATUS create_esync(int *fd, HANDLE *handle, ACCESS_MASK access,
|
||||
const OBJECT_ATTRIBUTES *attr, int initval, int flags)
|
||||
diff --git a/dlls/ntdll/esync.h b/dlls/ntdll/esync.h
|
||||
index fec0b68e8..a22618de8 100644
|
||||
index fec0b68e8d5..a22618de849 100644
|
||||
--- a/dlls/ntdll/esync.h
|
||||
+++ b/dlls/ntdll/esync.h
|
||||
@@ -19,6 +19,7 @@
|
||||
@@ -52,7 +52,7 @@ index fec0b68e8..a22618de8 100644
|
||||
extern NTSTATUS esync_create_semaphore(HANDLE *handle, ACCESS_MASK access,
|
||||
const OBJECT_ATTRIBUTES *attr, LONG initial, LONG max) DECLSPEC_HIDDEN;
|
||||
diff --git a/dlls/ntdll/om.c b/dlls/ntdll/om.c
|
||||
index b9fe302b1..ef2cb8b94 100644
|
||||
index f8f0760de70..b8d73a982b2 100644
|
||||
--- a/dlls/ntdll/om.c
|
||||
+++ b/dlls/ntdll/om.c
|
||||
@@ -34,6 +34,7 @@
|
||||
@@ -62,8 +62,8 @@ index b9fe302b1..ef2cb8b94 100644
|
||||
+#include "esync.h"
|
||||
#include "wine/server.h"
|
||||
#include "wine/exception.h"
|
||||
#include "wine/unicode.h"
|
||||
@@ -446,6 +447,9 @@ NTSTATUS close_handle( HANDLE handle )
|
||||
|
||||
@@ -387,6 +388,9 @@ NTSTATUS close_handle( HANDLE handle )
|
||||
NTSTATUS ret;
|
||||
int fd = server_remove_fd_from_cache( handle );
|
||||
|
||||
@@ -74,5 +74,5 @@ index b9fe302b1..ef2cb8b94 100644
|
||||
{
|
||||
req->handle = wine_server_obj_handle( handle );
|
||||
--
|
||||
2.20.1
|
||||
2.26.0
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From 034af084be3e4867cdf1243148ce5c6be80703ec Mon Sep 17 00:00:00 2001
|
||||
From 6c3029fe763d6c94016a038d016eb810ad8e38ef Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Fri, 15 Jun 2018 11:01:44 -0500
|
||||
Subject: [PATCH 40/83] server: Create eventfd descriptors for timers.
|
||||
Subject: [PATCH] server: Create eventfd descriptors for timers.
|
||||
|
||||
---
|
||||
dlls/ntdll/esync.c | 1 +
|
||||
@@ -10,7 +10,7 @@ Subject: [PATCH 40/83] server: Create eventfd descriptors for timers.
|
||||
3 files changed, 19 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/ntdll/esync.c b/dlls/ntdll/esync.c
|
||||
index 4adf01a11..9d9d767c4 100644
|
||||
index 17890f9e1f0..c1d8882d817 100644
|
||||
--- a/dlls/ntdll/esync.c
|
||||
+++ b/dlls/ntdll/esync.c
|
||||
@@ -241,6 +241,7 @@ static NTSTATUS get_waitable_object( HANDLE handle, struct esync **obj )
|
||||
@@ -22,10 +22,10 @@ index 4adf01a11..9d9d767c4 100644
|
||||
case ESYNC_QUEUE:
|
||||
esync = RtlAllocateHeap( GetProcessHeap(), 0, sizeof(*esync) );
|
||||
diff --git a/server/protocol.def b/server/protocol.def
|
||||
index 7dbd0a6db..d14fdb607 100644
|
||||
index 0ab32aaca64..eb80c81d6e6 100644
|
||||
--- a/server/protocol.def
|
||||
+++ b/server/protocol.def
|
||||
@@ -4079,6 +4079,7 @@ enum esync_type
|
||||
@@ -4080,6 +4080,7 @@ enum esync_type
|
||||
ESYNC_AUTO_EVENT,
|
||||
ESYNC_MANUAL_EVENT,
|
||||
ESYNC_MUTEX,
|
||||
@@ -34,7 +34,7 @@ index 7dbd0a6db..d14fdb607 100644
|
||||
ESYNC_QUEUE,
|
||||
};
|
||||
diff --git a/server/timer.c b/server/timer.c
|
||||
index 109aa0ff9..e0760ba11 100644
|
||||
index 2614e145c40..c3ebd3f52d3 100644
|
||||
--- a/server/timer.c
|
||||
+++ b/server/timer.c
|
||||
@@ -36,6 +36,7 @@
|
||||
@@ -78,7 +78,7 @@ index 109aa0ff9..e0760ba11 100644
|
||||
}
|
||||
}
|
||||
return timer;
|
||||
@@ -171,6 +177,9 @@ static int set_timer( struct timer *timer, timeout_t expire, unsigned int period
|
||||
@@ -172,6 +178,9 @@ static int set_timer( struct timer *timer, timeout_t expire, unsigned int period
|
||||
{
|
||||
period = 0; /* period doesn't make any sense for a manual timer */
|
||||
timer->signaled = 0;
|
||||
@@ -86,9 +86,9 @@ index 109aa0ff9..e0760ba11 100644
|
||||
+ if (do_esync())
|
||||
+ esync_clear( timer->esync_fd );
|
||||
}
|
||||
timer->when = (expire <= 0) ? current_time - expire : max( expire, current_time );
|
||||
timer->when = (expire <= 0) ? expire - monotonic_time : max( expire, current_time );
|
||||
timer->period = period;
|
||||
@@ -202,6 +211,13 @@ static int timer_signaled( struct object *obj, struct wait_queue_entry *entry )
|
||||
@@ -205,6 +214,13 @@ static int timer_signaled( struct object *obj, struct wait_queue_entry *entry )
|
||||
return timer->signaled;
|
||||
}
|
||||
|
||||
@@ -103,5 +103,5 @@ index 109aa0ff9..e0760ba11 100644
|
||||
{
|
||||
struct timer *timer = (struct timer *)obj;
|
||||
--
|
||||
2.20.1
|
||||
2.26.0
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 31b8b93cd83da65ee4439f0f06fb673257f1850c Mon Sep 17 00:00:00 2001
|
||||
From 525b78c2da9801372ef32849871859ad4cd16db0 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Sun, 10 Jun 2018 23:12:16 -0500
|
||||
Subject: [PATCH] server: Allocate shared memory segments for semaphores and
|
||||
@@ -23,7 +23,7 @@ init_server_dir()).
|
||||
4 files changed, 71 insertions(+)
|
||||
|
||||
diff --git a/server/esync.c b/server/esync.c
|
||||
index 5dd38c42a..fb9d02fc7 100644
|
||||
index 5dd38c42a4f..fb9d02fc7d2 100644
|
||||
--- a/server/esync.c
|
||||
+++ b/server/esync.c
|
||||
@@ -21,12 +21,20 @@
|
||||
@@ -137,7 +137,7 @@ index 5dd38c42a..fb9d02fc7 100644
|
||||
send_client_fd( current->process, esync->fd, reply->handle );
|
||||
release_object( esync );
|
||||
diff --git a/server/esync.h b/server/esync.h
|
||||
index 2687c72e4..aeb58c546 100644
|
||||
index 2687c72e419..aeb58c5469c 100644
|
||||
--- a/server/esync.h
|
||||
+++ b/server/esync.h
|
||||
@@ -19,6 +19,7 @@
|
||||
@@ -149,7 +149,7 @@ index 2687c72e4..aeb58c546 100644
|
||||
void esync_wake_up( struct object *obj );
|
||||
void esync_clear( int fd );
|
||||
diff --git a/server/main.c b/server/main.c
|
||||
index 57463aecc..2f4b3411b 100644
|
||||
index 483a0c85580..ef4d3d7d835 100644
|
||||
--- a/server/main.c
|
||||
+++ b/server/main.c
|
||||
@@ -36,6 +36,7 @@
|
||||
@@ -160,7 +160,7 @@ index 57463aecc..2f4b3411b 100644
|
||||
|
||||
/* command-line options */
|
||||
int debug_level = 0;
|
||||
@@ -141,6 +142,9 @@ int main( int argc, char *argv[] )
|
||||
@@ -140,6 +141,9 @@ int main( int argc, char *argv[] )
|
||||
sock_init();
|
||||
open_master_socket();
|
||||
|
||||
@@ -168,13 +168,13 @@ index 57463aecc..2f4b3411b 100644
|
||||
+ esync_init();
|
||||
+
|
||||
if (debug_level) fprintf( stderr, "wineserver: starting (pid=%ld)\n", (long) getpid() );
|
||||
set_current_time();
|
||||
init_scheduler();
|
||||
init_signals();
|
||||
diff --git a/server/protocol.def b/server/protocol.def
|
||||
index f0dc0d24d..88a443de4 100644
|
||||
index eb80c81d6e6..dde81a3ebcf 100644
|
||||
--- a/server/protocol.def
|
||||
+++ b/server/protocol.def
|
||||
@@ -4040,6 +4040,7 @@ struct handle_info
|
||||
@@ -4053,6 +4053,7 @@ struct handle_info
|
||||
@REPLY
|
||||
obj_handle_t handle; /* handle to the object */
|
||||
int type; /* type of esync object (see below) */
|
||||
@@ -182,7 +182,7 @@ index f0dc0d24d..88a443de4 100644
|
||||
@END
|
||||
|
||||
/* Open an esync object */
|
||||
@@ -4052,6 +4053,7 @@ struct handle_info
|
||||
@@ -4065,6 +4066,7 @@ struct handle_info
|
||||
@REPLY
|
||||
obj_handle_t handle; /* handle to the event */
|
||||
int type; /* type of esync object (above) */
|
||||
@@ -191,5 +191,5 @@ index f0dc0d24d..88a443de4 100644
|
||||
|
||||
/* Retrieve the esync fd for an object. */
|
||||
--
|
||||
2.23.0
|
||||
2.26.0
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user