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
37 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
a701f0ed4c | ||
|
c58c70e961 | ||
|
93e4c328d7 | ||
|
06c1bde586 | ||
|
ec47c04ab3 | ||
|
e7bff1bb4f | ||
|
39cafb1db1 | ||
|
49f93040fe | ||
|
af0347a0f2 | ||
|
0e828a225e | ||
|
eb5196c132 | ||
|
f45bfd8af7 | ||
|
d9dc36f879 | ||
|
2c7a662655 | ||
|
ec218012c3 | ||
|
c2d58dc59a | ||
|
2f3ba1fb46 | ||
|
9a1a1f02fb | ||
|
f7210fb07e | ||
|
9d12bd013b | ||
|
7da7ae71d2 | ||
|
f23105a6d8 | ||
|
a7ae3783c5 | ||
|
12d22ddfd7 | ||
|
b6649197d6 | ||
|
e1fb783018 | ||
|
1de1a96f1e | ||
|
00de4984f6 | ||
|
87b63971e9 | ||
|
f07947d41c | ||
|
ea7016fe39 | ||
|
a5044d57dd | ||
|
ba9e6db9f3 | ||
|
925645e710 | ||
|
2e982e862f | ||
|
8b65c06f30 | ||
|
f0d3ae8cf2 |
@@ -1,4 +1,4 @@
|
||||
From a7af0ee96959aab299e543e9d6938e2533780c47 Mon Sep 17 00:00:00 2001
|
||||
From 45713db2d90bd8833415ad2af1920cc792767535 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sat, 5 Aug 2017 04:02:16 +0200
|
||||
Subject: [PATCH] kernel32: Implement CreateProcessInternalW.
|
||||
@@ -11,7 +11,7 @@ Subject: [PATCH] kernel32: Implement CreateProcessInternalW.
|
||||
4 files changed, 17 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec
|
||||
index e78c1ca..fde5f18 100644
|
||||
index de6f007..a3607d1 100644
|
||||
--- a/dlls/kernel32/kernel32.spec
|
||||
+++ b/dlls/kernel32/kernel32.spec
|
||||
@@ -315,7 +315,7 @@
|
||||
@@ -24,10 +24,10 @@ index e78c1ca..fde5f18 100644
|
||||
@ stdcall CreateProcessW(wstr wstr ptr ptr long long ptr wstr ptr ptr)
|
||||
@ stdcall CreateRemoteThread(long ptr long ptr long long ptr)
|
||||
diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c
|
||||
index 2075dfd..f9606be 100644
|
||||
index f568022..e270ca7 100644
|
||||
--- a/dlls/kernel32/process.c
|
||||
+++ b/dlls/kernel32/process.c
|
||||
@@ -2436,12 +2436,13 @@ static LPWSTR get_file_name( LPCWSTR appname, LPWSTR cmdline, LPWSTR buffer,
|
||||
@@ -2438,12 +2438,13 @@ static LPWSTR get_file_name( LPCWSTR appname, LPWSTR cmdline, LPWSTR buffer,
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -47,17 +47,17 @@ index 2075dfd..f9606be 100644
|
||||
{
|
||||
BOOL retv = FALSE;
|
||||
HANDLE hFile = 0;
|
||||
@@ -2454,6 +2455,9 @@ static BOOL create_process_impl( LPCWSTR app_name, LPWSTR cmd_line, LPSECURITY_A
|
||||
@@ -2456,6 +2457,9 @@ static BOOL create_process_impl( LPCWSTR app_name, LPWSTR cmd_line, LPSECURITY_A
|
||||
|
||||
TRACE("app %s cmdline %s\n", debugstr_w(app_name), debugstr_w(cmd_line) );
|
||||
|
||||
+ if (token) FIXME("Creating a process with a token is not yet implemented\n");
|
||||
+ if (new_token) FIXME("No support for returning created process token\n");
|
||||
+
|
||||
if (!(tidy_cmdline = get_file_name( app_name, cmd_line, name, sizeof(name)/sizeof(WCHAR),
|
||||
if (!(tidy_cmdline = get_file_name( app_name, cmd_line, name, ARRAY_SIZE( name ),
|
||||
&hFile, &binary_info )))
|
||||
return FALSE;
|
||||
@@ -2605,8 +2609,8 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessA( LPCSTR app_name, LPSTR cmd_line, L
|
||||
@@ -2607,8 +2611,8 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessA( LPCSTR app_name, LPSTR cmd_line, L
|
||||
FIXME("StartupInfo.lpReserved is used, please report (%s)\n",
|
||||
debugstr_a(startup_info->lpReserved));
|
||||
|
||||
@@ -68,7 +68,7 @@ index 2075dfd..f9606be 100644
|
||||
done:
|
||||
HeapFree( GetProcessHeap(), 0, app_nameW );
|
||||
HeapFree( GetProcessHeap(), 0, cmd_lineW );
|
||||
@@ -2625,8 +2629,8 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessW( LPCWSTR app_name, LPWSTR cmd_line,
|
||||
@@ -2627,8 +2631,8 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessW( LPCWSTR app_name, LPWSTR cmd_line,
|
||||
LPVOID env, LPCWSTR cur_dir, LPSTARTUPINFOW startup_info,
|
||||
LPPROCESS_INFORMATION info )
|
||||
{
|
||||
@@ -80,7 +80,7 @@ index 2075dfd..f9606be 100644
|
||||
|
||||
|
||||
diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec
|
||||
index 8cac67f..e8fd7aa 100644
|
||||
index fb7fafe..9d6c5f9 100644
|
||||
--- a/dlls/kernelbase/kernelbase.spec
|
||||
+++ b/dlls/kernelbase/kernelbase.spec
|
||||
@@ -209,7 +209,7 @@
|
||||
@@ -93,7 +93,7 @@ index 8cac67f..e8fd7aa 100644
|
||||
@ stdcall CreateRemoteThread(long ptr long ptr long long ptr) kernel32.CreateRemoteThread
|
||||
@ stdcall CreateRemoteThreadEx(long ptr long ptr ptr long ptr ptr) kernel32.CreateRemoteThreadEx
|
||||
diff --git a/include/winbase.h b/include/winbase.h
|
||||
index 4ddc1d3..e21cf6e 100644
|
||||
index 667df96..b77bced 100644
|
||||
--- a/include/winbase.h
|
||||
+++ b/include/winbase.h
|
||||
@@ -1856,6 +1856,7 @@ WINBASEAPI BOOL WINAPI CreateProcessW(LPCWSTR,LPWSTR,LPSECURITY_ATTRIBUTE
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 23181e8cbe07ac0fd3b6effd04624122a6b0024f Mon Sep 17 00:00:00 2001
|
||||
From b534f2d905c3ba205c9a4f895149e6be8425b31e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sun, 6 Aug 2017 02:08:05 +0200
|
||||
Subject: [PATCH] server: Implement support for creating processes using a
|
||||
@@ -15,10 +15,10 @@ Subject: [PATCH] server: Implement support for creating processes using a
|
||||
7 files changed, 59 insertions(+), 21 deletions(-)
|
||||
|
||||
diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c
|
||||
index f9606be..c0b89f9 100644
|
||||
index e270ca7..633065b 100644
|
||||
--- a/dlls/kernel32/process.c
|
||||
+++ b/dlls/kernel32/process.c
|
||||
@@ -2034,7 +2034,7 @@ static NTSTATUS create_struct_sd(PSECURITY_DESCRIPTOR nt_sd, struct security_des
|
||||
@@ -2036,7 +2036,7 @@ static NTSTATUS create_struct_sd(PSECURITY_DESCRIPTOR nt_sd, struct security_des
|
||||
* Create a new process. If hFile is a valid handle we have an exe
|
||||
* file, otherwise it is a Winelib app.
|
||||
*/
|
||||
@@ -27,7 +27,7 @@ index f9606be..c0b89f9 100644
|
||||
LPCWSTR cur_dir, LPSECURITY_ATTRIBUTES psa, LPSECURITY_ATTRIBUTES tsa,
|
||||
BOOL inherit, DWORD flags, LPSTARTUPINFOW startup,
|
||||
LPPROCESS_INFORMATION info, LPCSTR unixdir,
|
||||
@@ -2180,6 +2180,7 @@ static BOOL create_process( HANDLE hFile, LPCWSTR filename, LPWSTR cmd_line, LPW
|
||||
@@ -2182,6 +2182,7 @@ static BOOL create_process( HANDLE hFile, LPCWSTR filename, LPWSTR cmd_line, LPW
|
||||
req->info_size = startup_info_size;
|
||||
req->env_size = (env_end - env) * sizeof(WCHAR);
|
||||
req->process_sd_size = process_sd_size;
|
||||
@@ -35,7 +35,7 @@ index f9606be..c0b89f9 100644
|
||||
|
||||
wine_server_add_data( req, startup_info, startup_info_size );
|
||||
wine_server_add_data( req, env, (env_end - env) * sizeof(WCHAR) );
|
||||
@@ -2280,7 +2281,7 @@ error:
|
||||
@@ -2282,7 +2283,7 @@ error:
|
||||
*
|
||||
* Create a new VDM process for a 16-bit or DOS application.
|
||||
*/
|
||||
@@ -44,7 +44,7 @@ index f9606be..c0b89f9 100644
|
||||
LPSECURITY_ATTRIBUTES psa, LPSECURITY_ATTRIBUTES tsa,
|
||||
BOOL inherit, DWORD flags, LPSTARTUPINFOW startup,
|
||||
LPPROCESS_INFORMATION info, LPCSTR unixdir,
|
||||
@@ -2304,7 +2305,7 @@ static BOOL create_vdm_process( LPCWSTR filename, LPWSTR cmd_line, LPWSTR env, L
|
||||
@@ -2306,7 +2307,7 @@ static BOOL create_vdm_process( LPCWSTR filename, LPWSTR cmd_line, LPWSTR env, L
|
||||
return FALSE;
|
||||
}
|
||||
sprintfW(new_cmd_line, argsW, winevdmW, buffer, cmd_line);
|
||||
@@ -53,7 +53,7 @@ index f9606be..c0b89f9 100644
|
||||
flags, startup, info, unixdir, binary_info, exec_only );
|
||||
HeapFree( GetProcessHeap(), 0, new_cmd_line );
|
||||
return ret;
|
||||
@@ -2316,7 +2317,7 @@ static BOOL create_vdm_process( LPCWSTR filename, LPWSTR cmd_line, LPWSTR env, L
|
||||
@@ -2318,7 +2319,7 @@ static BOOL create_vdm_process( LPCWSTR filename, LPWSTR cmd_line, LPWSTR env, L
|
||||
*
|
||||
* Create a new cmd shell process for a .BAT file.
|
||||
*/
|
||||
@@ -62,7 +62,7 @@ index f9606be..c0b89f9 100644
|
||||
LPSECURITY_ATTRIBUTES psa, LPSECURITY_ATTRIBUTES tsa,
|
||||
BOOL inherit, DWORD flags, LPSTARTUPINFOW startup,
|
||||
LPPROCESS_INFORMATION info )
|
||||
@@ -2344,8 +2345,8 @@ static BOOL create_cmd_process( LPCWSTR filename, LPWSTR cmd_line, LPVOID env, L
|
||||
@@ -2346,8 +2347,8 @@ static BOOL create_cmd_process( LPCWSTR filename, LPWSTR cmd_line, LPVOID env, L
|
||||
strcatW( newcmdline, quotW );
|
||||
strcatW( newcmdline, cmd_line );
|
||||
strcatW( newcmdline, quotW );
|
||||
@@ -73,7 +73,7 @@ index f9606be..c0b89f9 100644
|
||||
HeapFree( GetProcessHeap(), 0, newcmdline );
|
||||
return ret;
|
||||
}
|
||||
@@ -2455,7 +2456,9 @@ BOOL WINAPI CreateProcessInternalW( HANDLE token, LPCWSTR app_name, LPWSTR cmd_l
|
||||
@@ -2457,7 +2458,9 @@ BOOL WINAPI CreateProcessInternalW( HANDLE token, LPCWSTR app_name, LPWSTR cmd_l
|
||||
|
||||
TRACE("app %s cmdline %s\n", debugstr_w(app_name), debugstr_w(cmd_line) );
|
||||
|
||||
@@ -83,8 +83,8 @@ index f9606be..c0b89f9 100644
|
||||
+
|
||||
if (new_token) FIXME("No support for returning created process token\n");
|
||||
|
||||
if (!(tidy_cmdline = get_file_name( app_name, cmd_line, name, sizeof(name)/sizeof(WCHAR),
|
||||
@@ -2513,20 +2516,20 @@ BOOL WINAPI CreateProcessInternalW( HANDLE token, LPCWSTR app_name, LPWSTR cmd_l
|
||||
if (!(tidy_cmdline = get_file_name( app_name, cmd_line, name, ARRAY_SIZE( name ),
|
||||
@@ -2515,20 +2518,20 @@ BOOL WINAPI CreateProcessInternalW( HANDLE token, LPCWSTR app_name, LPWSTR cmd_l
|
||||
debugstr_w(name), (binary_info.flags & BINARY_FLAG_64BIT) ? 64 : 32,
|
||||
wine_dbgstr_longlong(binary_info.res_start), wine_dbgstr_longlong(binary_info.res_end),
|
||||
binary_info.arch, (binary_info.flags & BINARY_FLAG_FAKEDLL) ? ", fakedll" : "" );
|
||||
@@ -108,7 +108,7 @@ index f9606be..c0b89f9 100644
|
||||
inherit, flags, startup_info, info, unixdir, &binary_info, FALSE );
|
||||
break;
|
||||
case BINARY_UNKNOWN:
|
||||
@@ -2538,7 +2541,7 @@ BOOL WINAPI CreateProcessInternalW( HANDLE token, LPCWSTR app_name, LPWSTR cmd_l
|
||||
@@ -2540,7 +2543,7 @@ BOOL WINAPI CreateProcessInternalW( HANDLE token, LPCWSTR app_name, LPWSTR cmd_l
|
||||
TRACE( "starting %s as DOS binary\n", debugstr_w(name) );
|
||||
binary_info.type = BINARY_DOS;
|
||||
binary_info.arch = IMAGE_FILE_MACHINE_I386;
|
||||
@@ -117,7 +117,7 @@ index f9606be..c0b89f9 100644
|
||||
inherit, flags, startup_info, info, unixdir,
|
||||
&binary_info, FALSE );
|
||||
break;
|
||||
@@ -2546,7 +2549,7 @@ BOOL WINAPI CreateProcessInternalW( HANDLE token, LPCWSTR app_name, LPWSTR cmd_l
|
||||
@@ -2548,7 +2551,7 @@ BOOL WINAPI CreateProcessInternalW( HANDLE token, LPCWSTR app_name, LPWSTR cmd_l
|
||||
if (!strcmpiW( p, batW ) || !strcmpiW( p, cmdW ) )
|
||||
{
|
||||
TRACE( "starting %s as batch binary\n", debugstr_w(name) );
|
||||
@@ -126,7 +126,7 @@ index f9606be..c0b89f9 100644
|
||||
inherit, flags, startup_info, info );
|
||||
break;
|
||||
}
|
||||
@@ -2666,12 +2669,12 @@ static void exec_process( LPCWSTR name )
|
||||
@@ -2668,12 +2671,12 @@ static void exec_process( LPCWSTR name )
|
||||
debugstr_w(name), (binary_info.flags & BINARY_FLAG_64BIT) ? 64 : 32,
|
||||
wine_dbgstr_longlong(binary_info.res_start), wine_dbgstr_longlong(binary_info.res_end),
|
||||
binary_info.arch );
|
||||
@@ -141,7 +141,7 @@ index f9606be..c0b89f9 100644
|
||||
FALSE, 0, &startup_info, &info, NULL, &binary_info, TRUE );
|
||||
break;
|
||||
case BINARY_UNKNOWN:
|
||||
@@ -2685,7 +2688,7 @@ static void exec_process( LPCWSTR name )
|
||||
@@ -2687,7 +2690,7 @@ static void exec_process( LPCWSTR name )
|
||||
case BINARY_WIN16:
|
||||
case BINARY_DOS:
|
||||
TRACE( "starting %s as Win16/DOS binary\n", debugstr_w(name) );
|
||||
@@ -248,7 +248,7 @@ index 78e88ec..313c36a 100644
|
||||
extern struct thread *get_process_first_thread( struct process *process );
|
||||
extern struct process *get_process_from_id( process_id_t id );
|
||||
diff --git a/server/protocol.def b/server/protocol.def
|
||||
index 5fb6e38..f0bc83b 100644
|
||||
index b29df0a..95a120e 100644
|
||||
--- a/server/protocol.def
|
||||
+++ b/server/protocol.def
|
||||
@@ -748,6 +748,7 @@ struct rawinput_device
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From 31a5f689a12c1db6edcc86dcd8e81f38a5f19fc5 Mon Sep 17 00:00:00 2001
|
||||
From baff5c160cf7f1ac0011bf8f55d506bf0346e1fd Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Mon, 7 Aug 2017 02:53:06 +0200
|
||||
Subject: user32: Start explorer.exe using limited rights.
|
||||
Subject: [PATCH] user32: Start explorer.exe using limited rights.
|
||||
|
||||
---
|
||||
dlls/advapi32/tests/security.c | 4 ++--
|
||||
@@ -9,10 +9,10 @@ Subject: user32: Start explorer.exe using limited rights.
|
||||
2 files changed, 12 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c
|
||||
index f1a64e29dea..52524ee6fe2 100644
|
||||
index f27642e7a7..0271cd72e0 100644
|
||||
--- a/dlls/advapi32/tests/security.c
|
||||
+++ b/dlls/advapi32/tests/security.c
|
||||
@@ -7387,7 +7387,7 @@ static void test_token_security_descriptor(void)
|
||||
@@ -7313,7 +7313,7 @@ static void test_token_security_descriptor(void)
|
||||
ret = GetTokenInformation(token4, TokenIntegrityLevel, buffer_integrity, sizeof(buffer_integrity), &size);
|
||||
ok(ret, "GetTokenInformation failed with error %u\n", GetLastError());
|
||||
tml = (TOKEN_MANDATORY_LABEL *)buffer_integrity;
|
||||
@@ -21,7 +21,7 @@ index f1a64e29dea..52524ee6fe2 100644
|
||||
|
||||
size = 0;
|
||||
ret = GetKernelObjectSecurity(token4, LABEL_SECURITY_INFORMATION, NULL, 0, &size);
|
||||
@@ -7841,7 +7841,7 @@ static void test_child_token_sd_medium(void)
|
||||
@@ -7768,7 +7768,7 @@ static void test_child_token_sd_medium(void)
|
||||
ret = GetTokenInformation(token, TokenIntegrityLevel, buffer_integrity, sizeof(buffer_integrity), &size);
|
||||
ok(ret, "GetTokenInformation failed with error %u\n", GetLastError());
|
||||
tml = (TOKEN_MANDATORY_LABEL *)buffer_integrity;
|
||||
@@ -31,7 +31,7 @@ index f1a64e29dea..52524ee6fe2 100644
|
||||
HeapFree(GetProcessHeap(), 0, sd);
|
||||
}
|
||||
diff --git a/dlls/user32/win.c b/dlls/user32/win.c
|
||||
index cbf22374374..ea116b9d139 100644
|
||||
index cbfd8bb14a..8039f54fb0 100644
|
||||
--- a/dlls/user32/win.c
|
||||
+++ b/dlls/user32/win.c
|
||||
@@ -43,6 +43,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(win);
|
||||
@@ -43,15 +43,15 @@ index cbf22374374..ea116b9d139 100644
|
||||
static DWORD process_layout = ~0u;
|
||||
|
||||
static struct list window_surfaces = LIST_INIT( window_surfaces );
|
||||
@@ -2067,6 +2069,7 @@ HWND WINAPI GetDesktopWindow(void)
|
||||
WCHAR app[MAX_PATH + sizeof(explorer)/sizeof(WCHAR)];
|
||||
WCHAR cmdline[MAX_PATH + (sizeof(explorer) + sizeof(args))/sizeof(WCHAR)];
|
||||
@@ -2052,6 +2054,7 @@ HWND WINAPI GetDesktopWindow(void)
|
||||
WCHAR app[MAX_PATH + ARRAY_SIZE( explorer )];
|
||||
WCHAR cmdline[MAX_PATH + ARRAY_SIZE( explorer ) + ARRAY_SIZE( args )];
|
||||
WCHAR desktop[MAX_PATH];
|
||||
+ HANDLE token;
|
||||
void *redir;
|
||||
|
||||
SERVER_START_REQ( set_user_object_info )
|
||||
@@ -2099,9 +2102,12 @@ HWND WINAPI GetDesktopWindow(void)
|
||||
@@ -2084,9 +2087,12 @@ HWND WINAPI GetDesktopWindow(void)
|
||||
strcpyW( cmdline, app );
|
||||
strcatW( cmdline, args );
|
||||
|
||||
@@ -66,7 +66,7 @@ index cbf22374374..ea116b9d139 100644
|
||||
{
|
||||
TRACE( "started explorer pid %04x tid %04x\n", pi.dwProcessId, pi.dwThreadId );
|
||||
WaitForInputIdle( pi.hProcess, 10000 );
|
||||
@@ -2111,6 +2117,8 @@ HWND WINAPI GetDesktopWindow(void)
|
||||
@@ -2096,6 +2102,8 @@ HWND WINAPI GetDesktopWindow(void)
|
||||
else WARN( "failed to start explorer, err %d\n", GetLastError() );
|
||||
Wow64RevertWow64FsRedirection( redir );
|
||||
|
||||
@@ -76,5 +76,5 @@ index cbf22374374..ea116b9d139 100644
|
||||
{
|
||||
req->force = 1;
|
||||
--
|
||||
2.13.1
|
||||
2.18.0
|
||||
|
||||
|
@@ -1,20 +1,20 @@
|
||||
From 71366dad7ac934b2e24cfcf19104b4589b91652a Mon Sep 17 00:00:00 2001
|
||||
From b14282d138ff6a5ad1d5c152d0a556c9ca648c36 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Mon, 7 Aug 2017 03:33:26 +0200
|
||||
Subject: server: Correctly assign security labels for tokens.
|
||||
Subject: [PATCH] server: Correctly assign security labels for tokens.
|
||||
|
||||
---
|
||||
dlls/advapi32/tests/security.c | 21 ++++++++++-----------
|
||||
server/process.c | 8 +-------
|
||||
dlls/advapi32/tests/security.c | 21 +++++++++--------
|
||||
server/process.c | 8 +------
|
||||
server/security.h | 2 +-
|
||||
server/token.c | 41 ++++++++++++++++++++++++-----------------
|
||||
server/token.c | 41 ++++++++++++++++++++--------------
|
||||
4 files changed, 36 insertions(+), 36 deletions(-)
|
||||
|
||||
diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c
|
||||
index 52524ee6fe2..a35baab0e25 100644
|
||||
index 0271cd72e0..3b07e7cd2f 100644
|
||||
--- a/dlls/advapi32/tests/security.c
|
||||
+++ b/dlls/advapi32/tests/security.c
|
||||
@@ -7289,7 +7289,6 @@ static void test_token_security_descriptor(void)
|
||||
@@ -7215,7 +7215,6 @@ static void test_token_security_descriptor(void)
|
||||
defaulted = TRUE;
|
||||
ret = GetSecurityDescriptorDacl(sd2, &present, &acl2, &defaulted);
|
||||
ok(ret, "GetSecurityDescriptorDacl failed with error %u\n", GetLastError());
|
||||
@@ -22,7 +22,7 @@ index 52524ee6fe2..a35baab0e25 100644
|
||||
ok(present, "DACL not present\n");
|
||||
|
||||
if (present)
|
||||
@@ -7410,7 +7409,7 @@ static void test_token_security_descriptor(void)
|
||||
@@ -7336,7 +7335,7 @@ static void test_token_security_descriptor(void)
|
||||
ok(ret, "GetAce failed with error %u\n", GetLastError());
|
||||
ok(ace->Header.AceType == SYSTEM_MANDATORY_LABEL_ACE_TYPE,
|
||||
"Unexpected ACE type %#x\n", ace->Header.AceType);
|
||||
@@ -31,7 +31,7 @@ index 52524ee6fe2..a35baab0e25 100644
|
||||
"Expected medium integrity level\n");
|
||||
}
|
||||
|
||||
@@ -7463,8 +7462,8 @@ static void test_token_security_descriptor(void)
|
||||
@@ -7389,8 +7388,8 @@ static void test_token_security_descriptor(void)
|
||||
sacl = NULL;
|
||||
ret = GetSecurityDescriptorSacl(sd3, &present, &sacl, &defaulted);
|
||||
ok(ret, "GetSecurityDescriptorSacl failed with error %u\n", GetLastError());
|
||||
@@ -42,7 +42,7 @@ index 52524ee6fe2..a35baab0e25 100644
|
||||
|
||||
if (sacl)
|
||||
{
|
||||
@@ -7513,8 +7512,8 @@ static void test_token_security_descriptor(void)
|
||||
@@ -7439,8 +7438,8 @@ static void test_token_security_descriptor(void)
|
||||
sacl = NULL;
|
||||
ret = GetSecurityDescriptorSacl(sd3, &present, &sacl, &defaulted);
|
||||
ok(ret, "GetSecurityDescriptorSacl failed with error %u\n", GetLastError());
|
||||
@@ -53,7 +53,7 @@ index 52524ee6fe2..a35baab0e25 100644
|
||||
|
||||
if (sacl)
|
||||
{
|
||||
@@ -7578,8 +7577,8 @@ static void test_token_security_descriptor(void)
|
||||
@@ -7504,8 +7503,8 @@ static void test_token_security_descriptor(void)
|
||||
|
||||
ret = GetSecurityDescriptorSacl(sd3, &present, &sacl, &defaulted);
|
||||
ok(ret, "GetSecurityDescriptorSacl failed with error %u\n", GetLastError());
|
||||
@@ -64,7 +64,7 @@ index 52524ee6fe2..a35baab0e25 100644
|
||||
|
||||
if (sacl)
|
||||
{
|
||||
@@ -7616,8 +7615,8 @@ static void test_token_security_descriptor(void)
|
||||
@@ -7542,8 +7541,8 @@ static void test_token_security_descriptor(void)
|
||||
sacl = NULL;
|
||||
ret = GetSecurityDescriptorSacl(sd3, &present, &sacl, &defaulted);
|
||||
ok(ret, "GetSecurityDescriptorSacl failed with error %u\n", GetLastError());
|
||||
@@ -75,7 +75,7 @@ index 52524ee6fe2..a35baab0e25 100644
|
||||
|
||||
if (sacl)
|
||||
{
|
||||
@@ -7834,7 +7833,7 @@ static void test_child_token_sd_medium(void)
|
||||
@@ -7761,7 +7760,7 @@ static void test_child_token_sd_medium(void)
|
||||
ok(ret, "GetAce failed with error %u\n", GetLastError());
|
||||
ok(ace_label->Header.AceType == SYSTEM_MANDATORY_LABEL_ACE_TYPE,
|
||||
"Unexpected ACE type %#x\n", ace_label->Header.AceType);
|
||||
@@ -85,10 +85,10 @@ index 52524ee6fe2..a35baab0e25 100644
|
||||
|
||||
memset(buffer_integrity, 0, sizeof(buffer_integrity));
|
||||
diff --git a/server/process.c b/server/process.c
|
||||
index ef2452fb8fb..ae998ab80b9 100644
|
||||
index 7d2206f274..74cc320f44 100644
|
||||
--- a/server/process.c
|
||||
+++ b/server/process.c
|
||||
@@ -571,17 +571,11 @@ struct thread *create_process( int fd, struct thread *parent_thread, int inherit
|
||||
@@ -567,17 +567,11 @@ struct thread *create_process( int fd, struct thread *parent_thread, int inherit
|
||||
: alloc_handle_table( process, 0 );
|
||||
/* Note: for security reasons, starting a new process does not attempt
|
||||
* to use the current impersonation token for the new process */
|
||||
@@ -108,7 +108,7 @@ index ef2452fb8fb..ae998ab80b9 100644
|
||||
if (pipe( request_pipe ) == -1)
|
||||
{
|
||||
diff --git a/server/security.h b/server/security.h
|
||||
index 32dfe5f8db9..87377ccd673 100644
|
||||
index 32dfe5f8db..87377ccd67 100644
|
||||
--- a/server/security.h
|
||||
+++ b/server/security.h
|
||||
@@ -59,7 +59,7 @@ extern int token_assign_label( struct token *token, PSID label );
|
||||
@@ -121,10 +121,10 @@ index 32dfe5f8db9..87377ccd673 100644
|
||||
const LUID_AND_ATTRIBUTES *reqprivs,
|
||||
unsigned int count, LUID_AND_ATTRIBUTES *usedprivs);
|
||||
diff --git a/server/token.c b/server/token.c
|
||||
index c507294b49d..c6b0f0d39d3 100644
|
||||
index 28042471b0..e5639fc0d5 100644
|
||||
--- a/server/token.c
|
||||
+++ b/server/token.c
|
||||
@@ -686,7 +686,7 @@ static int filter_privilege( struct privilege *privilege, const LUID_AND_ATTRIBU
|
||||
@@ -668,7 +668,7 @@ static int filter_privilege( struct privilege *privilege, const LUID_AND_ATTRIBU
|
||||
struct token *token_duplicate( struct token *src_token, unsigned primary,
|
||||
int impersonation_level, const struct security_descriptor *sd,
|
||||
const LUID_AND_ATTRIBUTES *filter_privileges, unsigned int priv_count,
|
||||
@@ -133,7 +133,7 @@ index c507294b49d..c6b0f0d39d3 100644
|
||||
{
|
||||
const luid_t *modified_id =
|
||||
primary || (impersonation_level == src_token->impersonation_level) ?
|
||||
@@ -750,6 +750,12 @@ struct token *token_duplicate( struct token *src_token, unsigned primary,
|
||||
@@ -735,6 +735,12 @@ struct token *token_duplicate( struct token *src_token, unsigned primary,
|
||||
if (sd) default_set_sd( &token->obj, sd, OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION |
|
||||
DACL_SECURITY_INFORMATION | SACL_SECURITY_INFORMATION );
|
||||
|
||||
@@ -146,7 +146,7 @@ index c507294b49d..c6b0f0d39d3 100644
|
||||
return token;
|
||||
}
|
||||
|
||||
@@ -922,6 +928,12 @@ struct token *token_create_admin( void )
|
||||
@@ -907,6 +913,12 @@ struct token *token_create_admin( void )
|
||||
admin_source, NULL, -1, TokenElevationTypeFull, &high_label_sid );
|
||||
/* we really need a primary group */
|
||||
assert( token->primary_group );
|
||||
@@ -159,7 +159,7 @@ index c507294b49d..c6b0f0d39d3 100644
|
||||
}
|
||||
|
||||
free( logon_sid );
|
||||
@@ -980,6 +992,12 @@ static struct token *token_create_limited( void )
|
||||
@@ -965,6 +977,12 @@ static struct token *token_create_limited( void )
|
||||
admin_source, NULL, -1, TokenElevationTypeLimited, &medium_label_sid );
|
||||
/* we really need a primary group */
|
||||
assert( token->primary_group );
|
||||
@@ -172,7 +172,7 @@ index c507294b49d..c6b0f0d39d3 100644
|
||||
}
|
||||
|
||||
free( logon_sid );
|
||||
@@ -1448,7 +1466,8 @@ DECL_HANDLER(duplicate_token)
|
||||
@@ -1433,7 +1451,8 @@ DECL_HANDLER(duplicate_token)
|
||||
TOKEN_DUPLICATE,
|
||||
&token_ops )))
|
||||
{
|
||||
@@ -182,7 +182,7 @@ index c507294b49d..c6b0f0d39d3 100644
|
||||
if (token)
|
||||
{
|
||||
unsigned int access = req->access ? req->access : get_handle_access( current->process, req->handle );
|
||||
@@ -1478,7 +1497,7 @@ DECL_HANDLER(filter_token)
|
||||
@@ -1463,7 +1482,7 @@ DECL_HANDLER(filter_token)
|
||||
group_count = get_sid_count( filter_groups, get_req_data_size() - priv_count * sizeof(LUID_AND_ATTRIBUTES) );
|
||||
|
||||
token = token_duplicate( src_token, src_token->primary, src_token->impersonation_level, NULL,
|
||||
@@ -191,7 +191,7 @@ index c507294b49d..c6b0f0d39d3 100644
|
||||
if (token)
|
||||
{
|
||||
unsigned int access = get_handle_access( current->process, req->handle );
|
||||
@@ -1813,23 +1832,11 @@ DECL_HANDLER(set_token_default_dacl)
|
||||
@@ -1789,23 +1808,11 @@ DECL_HANDLER(set_token_default_dacl)
|
||||
DECL_HANDLER(create_token)
|
||||
{
|
||||
struct token *token;
|
||||
@@ -218,5 +218,5 @@ index c507294b49d..c6b0f0d39d3 100644
|
||||
}
|
||||
}
|
||||
--
|
||||
2.13.1
|
||||
2.18.0
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,12 +1,12 @@
|
||||
From a93e855c484c622efedfe9696eac72c32007621d Mon Sep 17 00:00:00 2001
|
||||
From 04bb8bf7196efb6f7c0a3c5f7524ac8aefc645b6 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sat, 7 Oct 2017 00:52:34 +0200
|
||||
Subject: wined3d: Add support for depth bias clamping.
|
||||
|
||||
---
|
||||
dlls/d3d11/device.c | 5 ++++-
|
||||
dlls/wined3d/adapter_gl.c | 3 +++
|
||||
dlls/wined3d/cs.c | 1 +
|
||||
dlls/wined3d/directx.c | 3 +++
|
||||
dlls/wined3d/state.c | 17 +++++++++++++++--
|
||||
dlls/wined3d/stateblock.c | 2 ++
|
||||
dlls/wined3d/utils.c | 1 +
|
||||
@@ -15,10 +15,10 @@ Subject: wined3d: Add support for depth bias clamping.
|
||||
8 files changed, 29 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
|
||||
index 68d6cf0..9854906 100644
|
||||
index e6ba31c..f0ff7b3 100644
|
||||
--- a/dlls/d3d11/device.c
|
||||
+++ b/dlls/d3d11/device.c
|
||||
@@ -920,7 +920,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_RSSetState(ID3D11DeviceCon
|
||||
@@ -933,7 +933,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_RSSetState(ID3D11DeviceCon
|
||||
{
|
||||
DWORD d;
|
||||
float f;
|
||||
@@ -27,7 +27,7 @@ index 68d6cf0..9854906 100644
|
||||
|
||||
TRACE("iface %p, rasterizer_state %p.\n", iface, rasterizer_state);
|
||||
|
||||
@@ -932,6 +932,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_RSSetState(ID3D11DeviceCon
|
||||
@@ -945,6 +945,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_RSSetState(ID3D11DeviceCon
|
||||
wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_CULLMODE, WINED3D_CULL_BACK);
|
||||
wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_SLOPESCALEDEPTHBIAS, 0);
|
||||
wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_DEPTHBIAS, 0);
|
||||
@@ -35,7 +35,7 @@ index 68d6cf0..9854906 100644
|
||||
wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_SCISSORTESTENABLE, FALSE);
|
||||
wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_MULTISAMPLEANTIALIAS, FALSE);
|
||||
wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_ANTIALIASEDLINEENABLE, FALSE);
|
||||
@@ -946,8 +947,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_RSSetState(ID3D11DeviceCon
|
||||
@@ -959,8 +960,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_RSSetState(ID3D11DeviceCon
|
||||
wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_CULLMODE, desc->CullMode);
|
||||
scale_bias.f = desc->SlopeScaledDepthBias;
|
||||
const_bias.f = desc->DepthBias;
|
||||
@@ -46,23 +46,11 @@ index 68d6cf0..9854906 100644
|
||||
wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_SCISSORTESTENABLE, desc->ScissorEnable);
|
||||
wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_MULTISAMPLEANTIALIAS, desc->MultisampleEnable);
|
||||
wined3d_device_set_render_state(device->wined3d_device,
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 3f1ca8c..aea2cdf 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -1065,6 +1065,7 @@ static void wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const
|
||||
device_invalidate_state(device, STATE_RENDER(WINED3D_RS_STENCILENABLE));
|
||||
device_invalidate_state(device, STATE_RENDER(WINED3D_RS_STENCILWRITEMASK));
|
||||
device_invalidate_state(device, STATE_RENDER(WINED3D_RS_DEPTHBIAS));
|
||||
+ device_invalidate_state(device, STATE_RENDER(WINED3D_RS_DEPTHBIASCLAMP));
|
||||
}
|
||||
else if (prev && prev->format->depth_bias_scale != op->view->format->depth_bias_scale)
|
||||
{
|
||||
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
|
||||
index a4e4a0c..e595da5 100644
|
||||
--- a/dlls/wined3d/directx.c
|
||||
+++ b/dlls/wined3d/directx.c
|
||||
@@ -233,6 +233,7 @@ static const struct wined3d_extension_map gl_extension_map[] =
|
||||
diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c
|
||||
index 686c79a..dc49c88 100644
|
||||
--- a/dlls/wined3d/adapter_gl.c
|
||||
+++ b/dlls/wined3d/adapter_gl.c
|
||||
@@ -180,6 +180,7 @@ static const struct wined3d_extension_map gl_extension_map[] =
|
||||
{"GL_EXT_packed_depth_stencil", EXT_PACKED_DEPTH_STENCIL },
|
||||
{"GL_EXT_packed_float", EXT_PACKED_FLOAT },
|
||||
{"GL_EXT_point_parameters", EXT_POINT_PARAMETERS },
|
||||
@@ -70,7 +58,7 @@ index a4e4a0c..e595da5 100644
|
||||
{"GL_EXT_provoking_vertex", EXT_PROVOKING_VERTEX },
|
||||
{"GL_EXT_secondary_color", EXT_SECONDARY_COLOR },
|
||||
{"GL_EXT_stencil_two_side", EXT_STENCIL_TWO_SIDE },
|
||||
@@ -3117,6 +3118,8 @@ static void load_gl_funcs(struct wined3d_gl_info *gl_info)
|
||||
@@ -2473,6 +2474,8 @@ static void load_gl_funcs(struct wined3d_gl_info *gl_info)
|
||||
/* GL_EXT_point_parameters */
|
||||
USE_GL_FUNC(glPointParameterfEXT)
|
||||
USE_GL_FUNC(glPointParameterfvEXT)
|
||||
@@ -79,6 +67,18 @@ index a4e4a0c..e595da5 100644
|
||||
/* GL_EXT_provoking_vertex */
|
||||
USE_GL_FUNC(glProvokingVertexEXT)
|
||||
/* GL_EXT_secondary_color */
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index d6bc739..515982c 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -1124,6 +1124,7 @@ static void wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const
|
||||
device_invalidate_state(device, STATE_RENDER(WINED3D_RS_STENCILENABLE));
|
||||
device_invalidate_state(device, STATE_RENDER(WINED3D_RS_STENCILWRITEMASK));
|
||||
device_invalidate_state(device, STATE_RENDER(WINED3D_RS_DEPTHBIAS));
|
||||
+ device_invalidate_state(device, STATE_RENDER(WINED3D_RS_DEPTHBIASCLAMP));
|
||||
}
|
||||
else if (prev && prev->format->depth_bias_scale != op->view->format->depth_bias_scale)
|
||||
{
|
||||
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
|
||||
index 3b2f845..2dd6ac2 100644
|
||||
--- a/dlls/wined3d/state.c
|
||||
@@ -138,10 +138,10 @@ index b4d1751..093c740 100644
|
||||
state->render_states[WINED3D_RS_WRAP9] = 0;
|
||||
state->render_states[WINED3D_RS_WRAP10] = 0;
|
||||
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
|
||||
index 7cecd8c..0152879 100644
|
||||
index 861f169..b46f67f 100644
|
||||
--- a/dlls/wined3d/utils.c
|
||||
+++ b/dlls/wined3d/utils.c
|
||||
@@ -4425,6 +4425,7 @@ const char *debug_d3drenderstate(enum wined3d_render_state state)
|
||||
@@ -4652,6 +4652,7 @@ const char *debug_d3drenderstate(enum wined3d_render_state state)
|
||||
D3DSTATE_TO_STR(WINED3D_RS_BLENDFACTOR);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_SRGBWRITEENABLE);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_DEPTHBIAS);
|
||||
@@ -162,10 +162,10 @@ index 525c298..883faaa 100644
|
||||
EXT_SECONDARY_COLOR,
|
||||
EXT_STENCIL_TWO_SIDE,
|
||||
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
|
||||
index bb4ad48..4a5d0dd 100644
|
||||
index 239ccd8..884e824 100644
|
||||
--- a/include/wine/wined3d.h
|
||||
+++ b/include/wine/wined3d.h
|
||||
@@ -386,8 +386,9 @@ enum wined3d_render_state
|
||||
@@ -399,8 +399,9 @@ enum wined3d_render_state
|
||||
WINED3D_RS_SRCBLENDALPHA = 207,
|
||||
WINED3D_RS_DESTBLENDALPHA = 208,
|
||||
WINED3D_RS_BLENDOPALPHA = 209,
|
||||
|
@@ -1,2 +1 @@
|
||||
Fixes: Implement support for more d3d11 depth options in RSSetState.
|
||||
Fixes: [43848] Implement support for depth bias clamping
|
||||
|
@@ -1,26 +0,0 @@
|
||||
From 34607775675c9475973fd249b8a68a59935b0391 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Thu, 30 Jul 2015 11:57:28 +1000
|
||||
Subject: d3dx9_36: Return a mesh in D3DXCreateTeapot
|
||||
|
||||
Fixes https://bugs.winehq.org/show_bug.cgi?id=36884
|
||||
---
|
||||
dlls/d3dx9_36/mesh.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/d3dx9_36/mesh.c b/dlls/d3dx9_36/mesh.c
|
||||
index 39d279d..59e385e4 100644
|
||||
--- a/dlls/d3dx9_36/mesh.c
|
||||
+++ b/dlls/d3dx9_36/mesh.c
|
||||
@@ -5153,7 +5153,7 @@ HRESULT WINAPI D3DXCreateTeapot(struct IDirect3DDevice9 *device,
|
||||
{
|
||||
FIXME("(%p, %p, %p): stub\n", device, mesh, adjacency);
|
||||
|
||||
- return E_NOTIMPL;
|
||||
+ return D3DXCreateSphere(device, 1.0f, 4, 4, mesh, adjacency);
|
||||
}
|
||||
|
||||
HRESULT WINAPI D3DXCreateTextA(struct IDirect3DDevice9 *device, HDC hdc, const char *text, float deviation,
|
||||
--
|
||||
2.5.0
|
||||
|
@@ -1 +0,0 @@
|
||||
Fixes: [36884] Return a valid mesh in D3DXCreateTeapot
|
@@ -1,5 +1,5 @@
|
||||
From 9acf83e4be20fe0ce12df7c966a748bf8524f26f Mon Sep 17 00:00:00 2001
|
||||
From: Kyle Devir <kyle.devir@mykolab.com>
|
||||
From 54da28ec1779f20790f48721ec0c0b62e8ebcfc1 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Costa <titan.costa@gmail.com>
|
||||
Date: Fri, 30 Mar 2018 08:22:02 +0000
|
||||
Subject: [PATCH] d3dx9_36: add DXTn support
|
||||
|
||||
@@ -29,7 +29,7 @@ Subject: [PATCH] d3dx9_36: add DXTn support
|
||||
22 files changed, 117 insertions(+), 31 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3dx9_24/Makefile.in b/dlls/d3dx9_24/Makefile.in
|
||||
index 482c92d64e..d969a55b10 100644
|
||||
index 482c92d..d969a55 100644
|
||||
--- a/dlls/d3dx9_24/Makefile.in
|
||||
+++ b/dlls/d3dx9_24/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
@@ -41,7 +41,7 @@ index 482c92d64e..d969a55b10 100644
|
||||
|
||||
C_SRCS = \
|
||||
diff --git a/dlls/d3dx9_25/Makefile.in b/dlls/d3dx9_25/Makefile.in
|
||||
index be4c76980e..b232290d25 100644
|
||||
index be4c769..b232290 100644
|
||||
--- a/dlls/d3dx9_25/Makefile.in
|
||||
+++ b/dlls/d3dx9_25/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
@@ -53,7 +53,7 @@ index be4c76980e..b232290d25 100644
|
||||
|
||||
C_SRCS = \
|
||||
diff --git a/dlls/d3dx9_26/Makefile.in b/dlls/d3dx9_26/Makefile.in
|
||||
index c5e9e85bfb..525009d292 100644
|
||||
index c5e9e85..525009d 100644
|
||||
--- a/dlls/d3dx9_26/Makefile.in
|
||||
+++ b/dlls/d3dx9_26/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
@@ -65,7 +65,7 @@ index c5e9e85bfb..525009d292 100644
|
||||
|
||||
C_SRCS = \
|
||||
diff --git a/dlls/d3dx9_27/Makefile.in b/dlls/d3dx9_27/Makefile.in
|
||||
index ee7f0e2449..da98482d24 100644
|
||||
index ee7f0e2..da98482 100644
|
||||
--- a/dlls/d3dx9_27/Makefile.in
|
||||
+++ b/dlls/d3dx9_27/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
@@ -77,7 +77,7 @@ index ee7f0e2449..da98482d24 100644
|
||||
|
||||
C_SRCS = \
|
||||
diff --git a/dlls/d3dx9_28/Makefile.in b/dlls/d3dx9_28/Makefile.in
|
||||
index 094420013d..d50e035853 100644
|
||||
index 0944200..d50e035 100644
|
||||
--- a/dlls/d3dx9_28/Makefile.in
|
||||
+++ b/dlls/d3dx9_28/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
@@ -89,7 +89,7 @@ index 094420013d..d50e035853 100644
|
||||
|
||||
C_SRCS = \
|
||||
diff --git a/dlls/d3dx9_29/Makefile.in b/dlls/d3dx9_29/Makefile.in
|
||||
index 88cb110ff5..cfc1a15034 100644
|
||||
index 88cb110..cfc1a15 100644
|
||||
--- a/dlls/d3dx9_29/Makefile.in
|
||||
+++ b/dlls/d3dx9_29/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
@@ -101,7 +101,7 @@ index 88cb110ff5..cfc1a15034 100644
|
||||
|
||||
C_SRCS = \
|
||||
diff --git a/dlls/d3dx9_30/Makefile.in b/dlls/d3dx9_30/Makefile.in
|
||||
index 6ab2ff2451..726c92e8fd 100644
|
||||
index 6ab2ff2..726c92e 100644
|
||||
--- a/dlls/d3dx9_30/Makefile.in
|
||||
+++ b/dlls/d3dx9_30/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
@@ -113,7 +113,7 @@ index 6ab2ff2451..726c92e8fd 100644
|
||||
|
||||
C_SRCS = \
|
||||
diff --git a/dlls/d3dx9_31/Makefile.in b/dlls/d3dx9_31/Makefile.in
|
||||
index 3d44da147d..201430127c 100644
|
||||
index 3d44da1..2014301 100644
|
||||
--- a/dlls/d3dx9_31/Makefile.in
|
||||
+++ b/dlls/d3dx9_31/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
@@ -125,7 +125,7 @@ index 3d44da147d..201430127c 100644
|
||||
|
||||
C_SRCS = \
|
||||
diff --git a/dlls/d3dx9_32/Makefile.in b/dlls/d3dx9_32/Makefile.in
|
||||
index 37cc2797af..442258d8f3 100644
|
||||
index 37cc279..442258d 100644
|
||||
--- a/dlls/d3dx9_32/Makefile.in
|
||||
+++ b/dlls/d3dx9_32/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
@@ -137,7 +137,7 @@ index 37cc2797af..442258d8f3 100644
|
||||
|
||||
C_SRCS = \
|
||||
diff --git a/dlls/d3dx9_33/Makefile.in b/dlls/d3dx9_33/Makefile.in
|
||||
index 5b03ec134d..cc98ed2501 100644
|
||||
index 5b03ec1..cc98ed2 100644
|
||||
--- a/dlls/d3dx9_33/Makefile.in
|
||||
+++ b/dlls/d3dx9_33/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
@@ -149,7 +149,7 @@ index 5b03ec134d..cc98ed2501 100644
|
||||
|
||||
C_SRCS = \
|
||||
diff --git a/dlls/d3dx9_34/Makefile.in b/dlls/d3dx9_34/Makefile.in
|
||||
index b7f9c46d5e..4862fe94af 100644
|
||||
index b7f9c46..4862fe9 100644
|
||||
--- a/dlls/d3dx9_34/Makefile.in
|
||||
+++ b/dlls/d3dx9_34/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
@@ -161,7 +161,7 @@ index b7f9c46d5e..4862fe94af 100644
|
||||
|
||||
C_SRCS = \
|
||||
diff --git a/dlls/d3dx9_35/Makefile.in b/dlls/d3dx9_35/Makefile.in
|
||||
index 9c196ea038..3f529c9915 100644
|
||||
index 9c196ea..3f529c9 100644
|
||||
--- a/dlls/d3dx9_35/Makefile.in
|
||||
+++ b/dlls/d3dx9_35/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
@@ -173,7 +173,7 @@ index 9c196ea038..3f529c9915 100644
|
||||
|
||||
C_SRCS = \
|
||||
diff --git a/dlls/d3dx9_36/Makefile.in b/dlls/d3dx9_36/Makefile.in
|
||||
index da8098dd8d..166031e6a4 100644
|
||||
index da8098d..166031e 100644
|
||||
--- a/dlls/d3dx9_36/Makefile.in
|
||||
+++ b/dlls/d3dx9_36/Makefile.in
|
||||
@@ -1,7 +1,7 @@
|
||||
@@ -186,7 +186,7 @@ index da8098dd8d..166031e6a4 100644
|
||||
C_SRCS = \
|
||||
animation.c \
|
||||
diff --git a/dlls/d3dx9_36/surface.c b/dlls/d3dx9_36/surface.c
|
||||
index d1af90ccd1..73a1cbde1a 100644
|
||||
index 0a6e20e..a33b6e2 100644
|
||||
--- a/dlls/d3dx9_36/surface.c
|
||||
+++ b/dlls/d3dx9_36/surface.c
|
||||
@@ -27,6 +27,8 @@
|
||||
@@ -198,7 +198,7 @@ index d1af90ccd1..73a1cbde1a 100644
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3dx);
|
||||
|
||||
|
||||
@@ -1817,6 +1819,24 @@ void point_filter_argb_pixels(const BYTE *src, UINT src_row_pitch, UINT src_slic
|
||||
@@ -1715,6 +1717,24 @@ void point_filter_argb_pixels(const BYTE *src, UINT src_row_pitch, UINT src_slic
|
||||
}
|
||||
}
|
||||
|
||||
@@ -223,7 +223,7 @@ index d1af90ccd1..73a1cbde1a 100644
|
||||
/************************************************************
|
||||
* D3DXLoadSurfaceFromMemory
|
||||
*
|
||||
@@ -1858,6 +1878,7 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface,
|
||||
@@ -1756,6 +1776,7 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface,
|
||||
D3DSURFACE_DESC surfdesc;
|
||||
D3DLOCKED_RECT lockrect;
|
||||
struct volume src_size, dst_size;
|
||||
@@ -231,7 +231,7 @@ index d1af90ccd1..73a1cbde1a 100644
|
||||
|
||||
TRACE("(%p, %p, %s, %p, %#x, %u, %p, %s, %#x, 0x%08x)\n",
|
||||
dst_surface, dst_palette, wine_dbgstr_rect(dst_rect), src_memory, src_format,
|
||||
@@ -1939,8 +1960,15 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface,
|
||||
@@ -1837,8 +1858,15 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface,
|
||||
}
|
||||
else /* Stretching or format conversion. */
|
||||
{
|
||||
@@ -249,7 +249,7 @@ index d1af90ccd1..73a1cbde1a 100644
|
||||
{
|
||||
FIXME("Unsupported format conversion %#x -> %#x.\n", src_format, surfdesc.Format);
|
||||
return E_NOTIMPL;
|
||||
@@ -1949,10 +1977,52 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface,
|
||||
@@ -1847,10 +1875,52 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface,
|
||||
if (FAILED(IDirect3DSurface9_LockRect(dst_surface, &lockrect, dst_rect, 0)))
|
||||
return D3DXERR_INVALIDDATA;
|
||||
|
||||
@@ -304,7 +304,7 @@ index d1af90ccd1..73a1cbde1a 100644
|
||||
}
|
||||
else /* if ((filter & 0xf) == D3DX_FILTER_POINT) */
|
||||
{
|
||||
@@ -1961,14 +2031,30 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface,
|
||||
@@ -1859,14 +1929,30 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface,
|
||||
|
||||
/* Always apply a point filter until D3DX_FILTER_LINEAR,
|
||||
* D3DX_FILTER_TRIANGLE and D3DX_FILTER_BOX are implemented. */
|
||||
@@ -339,10 +339,10 @@ index d1af90ccd1..73a1cbde1a 100644
|
||||
|
||||
/************************************************************
|
||||
diff --git a/dlls/d3dx9_36/tests/surface.c b/dlls/d3dx9_36/tests/surface.c
|
||||
index 753b30273d..680f59ca21 100644
|
||||
index 37c488b..5697f93 100644
|
||||
--- a/dlls/d3dx9_36/tests/surface.c
|
||||
+++ b/dlls/d3dx9_36/tests/surface.c
|
||||
@@ -1205,7 +1205,7 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
|
||||
@@ -1179,7 +1179,7 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
|
||||
hr = IDirect3DTexture9_GetSurfaceLevel(tex, 0, &newsurf);
|
||||
ok(SUCCEEDED(hr), "Failed to get the surface, hr %#x.\n", hr);
|
||||
hr = D3DXLoadSurfaceFromSurface(newsurf, NULL, NULL, surf, NULL, NULL, D3DX_FILTER_NONE, 0);
|
||||
@@ -351,7 +351,7 @@ index 753b30273d..680f59ca21 100644
|
||||
check_release((IUnknown*)newsurf, 1);
|
||||
check_release((IUnknown*)tex, 0);
|
||||
}
|
||||
@@ -1231,7 +1231,7 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
|
||||
@@ -1205,7 +1205,7 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
|
||||
hr = IDirect3DTexture9_GetSurfaceLevel(tex, 0, &newsurf);
|
||||
ok(SUCCEEDED(hr), "Failed to get the surface, hr %#x.\n", hr);
|
||||
hr = D3DXLoadSurfaceFromSurface(newsurf, NULL, NULL, surf, NULL, NULL, D3DX_FILTER_NONE, 0);
|
||||
@@ -360,7 +360,7 @@ index 753b30273d..680f59ca21 100644
|
||||
check_release((IUnknown*)newsurf, 1);
|
||||
check_release((IUnknown*)tex, 0);
|
||||
}
|
||||
@@ -1244,10 +1244,10 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
|
||||
@@ -1218,10 +1218,10 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
|
||||
hr = IDirect3DTexture9_GetSurfaceLevel(tex, 0, &newsurf);
|
||||
ok(SUCCEEDED(hr), "Failed to get the surface, hr %#x.\n", hr);
|
||||
hr = D3DXLoadSurfaceFromSurface(newsurf, NULL, NULL, surf, NULL, NULL, D3DX_FILTER_NONE, 0);
|
||||
@@ -374,7 +374,7 @@ index 753b30273d..680f59ca21 100644
|
||||
check_release((IUnknown*)newsurf, 1);
|
||||
check_release((IUnknown*)tex, 0);
|
||||
diff --git a/dlls/d3dx9_37/Makefile.in b/dlls/d3dx9_37/Makefile.in
|
||||
index ab790a4d5c..51382c7109 100644
|
||||
index ab790a4..51382c7 100644
|
||||
--- a/dlls/d3dx9_37/Makefile.in
|
||||
+++ b/dlls/d3dx9_37/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
@@ -386,7 +386,7 @@ index ab790a4d5c..51382c7109 100644
|
||||
|
||||
C_SRCS = \
|
||||
diff --git a/dlls/d3dx9_38/Makefile.in b/dlls/d3dx9_38/Makefile.in
|
||||
index 6125c2da67..f6257cbdec 100644
|
||||
index 6125c2d..f6257cb 100644
|
||||
--- a/dlls/d3dx9_38/Makefile.in
|
||||
+++ b/dlls/d3dx9_38/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
@@ -398,7 +398,7 @@ index 6125c2da67..f6257cbdec 100644
|
||||
|
||||
C_SRCS = \
|
||||
diff --git a/dlls/d3dx9_39/Makefile.in b/dlls/d3dx9_39/Makefile.in
|
||||
index d97a787c67..a68ee9f3ad 100644
|
||||
index d97a787..a68ee9f 100644
|
||||
--- a/dlls/d3dx9_39/Makefile.in
|
||||
+++ b/dlls/d3dx9_39/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
@@ -410,7 +410,7 @@ index d97a787c67..a68ee9f3ad 100644
|
||||
|
||||
C_SRCS = \
|
||||
diff --git a/dlls/d3dx9_40/Makefile.in b/dlls/d3dx9_40/Makefile.in
|
||||
index 36c5a210cd..7f2cfe1a47 100644
|
||||
index 36c5a21..7f2cfe1 100644
|
||||
--- a/dlls/d3dx9_40/Makefile.in
|
||||
+++ b/dlls/d3dx9_40/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
@@ -422,7 +422,7 @@ index 36c5a210cd..7f2cfe1a47 100644
|
||||
|
||||
C_SRCS = \
|
||||
diff --git a/dlls/d3dx9_41/Makefile.in b/dlls/d3dx9_41/Makefile.in
|
||||
index d4552cf608..c5c3ab1aae 100644
|
||||
index d4552cf..c5c3ab1 100644
|
||||
--- a/dlls/d3dx9_41/Makefile.in
|
||||
+++ b/dlls/d3dx9_41/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
@@ -434,7 +434,7 @@ index d4552cf608..c5c3ab1aae 100644
|
||||
|
||||
C_SRCS = \
|
||||
diff --git a/dlls/d3dx9_42/Makefile.in b/dlls/d3dx9_42/Makefile.in
|
||||
index 5806fce66c..e9a8e89da5 100644
|
||||
index 5806fce..e9a8e89 100644
|
||||
--- a/dlls/d3dx9_42/Makefile.in
|
||||
+++ b/dlls/d3dx9_42/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
@@ -446,7 +446,7 @@ index 5806fce66c..e9a8e89da5 100644
|
||||
|
||||
C_SRCS = \
|
||||
diff --git a/dlls/d3dx9_43/Makefile.in b/dlls/d3dx9_43/Makefile.in
|
||||
index 72ba8b4c1e..33185bf7a8 100644
|
||||
index 72ba8b4..33185bf 100644
|
||||
--- a/dlls/d3dx9_43/Makefile.in
|
||||
+++ b/dlls/d3dx9_43/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
@@ -458,5 +458,5 @@ index 72ba8b4c1e..33185bf7a8 100644
|
||||
|
||||
C_SRCS = \
|
||||
--
|
||||
2.16.3
|
||||
1.9.1
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 5353d54df3ddf2f7bb62ea0214e040aa391b596f Mon Sep 17 00:00:00 2001
|
||||
From 25c2a52b1109022a01b8f59a22b8a04566af0d3c Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Fri, 4 Mar 2016 22:22:42 +0100
|
||||
Subject: [PATCH] ddraw: Set ddsOldCaps correctly in ddraw7_GetCaps.
|
||||
@@ -12,7 +12,7 @@ Subject: [PATCH] ddraw: Set ddsOldCaps correctly in ddraw7_GetCaps.
|
||||
5 files changed, 106 insertions(+)
|
||||
|
||||
diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c
|
||||
index 33e18b8d6ab..2628b7654f4 100644
|
||||
index ed904785dd..47f079fb97 100644
|
||||
--- a/dlls/ddraw/ddraw.c
|
||||
+++ b/dlls/ddraw/ddraw.c
|
||||
@@ -1542,6 +1542,8 @@ static HRESULT WINAPI ddraw7_GetCaps(IDirectDraw7 *iface, DDCAPS *DriverCaps, DD
|
||||
@@ -25,10 +25,10 @@ index 33e18b8d6ab..2628b7654f4 100644
|
||||
|
||||
if(DriverCaps)
|
||||
diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c
|
||||
index fb0858f253b..b7becc389cb 100644
|
||||
index d4fe1f294a..29d9d3afb7 100644
|
||||
--- a/dlls/ddraw/tests/ddraw1.c
|
||||
+++ b/dlls/ddraw/tests/ddraw1.c
|
||||
@@ -11415,6 +11415,31 @@ static void test_execute_data(void)
|
||||
@@ -11538,6 +11538,31 @@ static void test_execute_data(void)
|
||||
DestroyWindow(window);
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ index fb0858f253b..b7becc389cb 100644
|
||||
static void test_viewport(void)
|
||||
{
|
||||
static struct
|
||||
@@ -11690,6 +11715,7 @@ START_TEST(ddraw1)
|
||||
@@ -11815,6 +11840,7 @@ START_TEST(ddraw1)
|
||||
test_depth_readback();
|
||||
test_clear();
|
||||
test_enum_surfaces();
|
||||
@@ -69,10 +69,10 @@ index fb0858f253b..b7becc389cb 100644
|
||||
test_viewport();
|
||||
}
|
||||
diff --git a/dlls/ddraw/tests/ddraw2.c b/dlls/ddraw/tests/ddraw2.c
|
||||
index c2b438cf2ae..61857991f8f 100644
|
||||
index 941d46bf42..752b39568d 100644
|
||||
--- a/dlls/ddraw/tests/ddraw2.c
|
||||
+++ b/dlls/ddraw/tests/ddraw2.c
|
||||
@@ -12677,6 +12677,31 @@ static void test_enum_surfaces(void)
|
||||
@@ -12800,6 +12800,31 @@ static void test_enum_surfaces(void)
|
||||
IDirectDraw2_Release(ddraw);
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ index c2b438cf2ae..61857991f8f 100644
|
||||
static void test_viewport(void)
|
||||
{
|
||||
static struct
|
||||
@@ -12981,5 +13006,6 @@ START_TEST(ddraw2)
|
||||
@@ -13106,5 +13131,6 @@ START_TEST(ddraw2)
|
||||
test_depth_readback();
|
||||
test_clear();
|
||||
test_enum_surfaces();
|
||||
@@ -112,10 +112,10 @@ index c2b438cf2ae..61857991f8f 100644
|
||||
test_viewport();
|
||||
}
|
||||
diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c
|
||||
index 9c4c5a3e5b2..6eebcb30311 100644
|
||||
index e81472d4f2..4e083ec503 100644
|
||||
--- a/dlls/ddraw/tests/ddraw4.c
|
||||
+++ b/dlls/ddraw/tests/ddraw4.c
|
||||
@@ -14957,6 +14957,31 @@ static void test_viewport(void)
|
||||
@@ -15089,6 +15089,31 @@ static void test_viewport(void)
|
||||
DestroyWindow(window);
|
||||
}
|
||||
|
||||
@@ -147,17 +147,17 @@ index 9c4c5a3e5b2..6eebcb30311 100644
|
||||
START_TEST(ddraw4)
|
||||
{
|
||||
DDDEVICEIDENTIFIER identifier;
|
||||
@@ -15082,4 +15107,5 @@ START_TEST(ddraw4)
|
||||
@@ -15215,4 +15240,5 @@ START_TEST(ddraw4)
|
||||
test_clear();
|
||||
test_enum_surfaces();
|
||||
test_viewport();
|
||||
+ test_caps();
|
||||
}
|
||||
diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c
|
||||
index b4910c196cd..bf1e1cf1207 100644
|
||||
index 70318a8492..f3dde436d3 100644
|
||||
--- a/dlls/ddraw/tests/ddraw7.c
|
||||
+++ b/dlls/ddraw/tests/ddraw7.c
|
||||
@@ -14289,6 +14289,31 @@ static void test_viewport(void)
|
||||
@@ -15035,6 +15035,31 @@ static void test_color_vertex(void)
|
||||
DestroyWindow(window);
|
||||
}
|
||||
|
||||
@@ -189,12 +189,13 @@ index b4910c196cd..bf1e1cf1207 100644
|
||||
START_TEST(ddraw7)
|
||||
{
|
||||
DDDEVICEIDENTIFIER2 identifier;
|
||||
@@ -14424,4 +14449,5 @@ START_TEST(ddraw7)
|
||||
test_clear();
|
||||
@@ -15172,5 +15197,6 @@ START_TEST(ddraw7)
|
||||
test_enum_surfaces();
|
||||
test_viewport();
|
||||
test_device_load();
|
||||
+ test_caps();
|
||||
test_color_vertex();
|
||||
}
|
||||
--
|
||||
2.17.0
|
||||
2.18.0
|
||||
|
||||
|
@@ -0,0 +1,405 @@
|
||||
From b545fa3045a535c75e0611ca6c80b43e5dde57d5 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Mon, 30 Jul 2018 09:33:29 +1000
|
||||
Subject: [PATCH] dinput8: Use shared source directory.
|
||||
|
||||
Based off a patch by Andrew Wesie.
|
||||
|
||||
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
---
|
||||
dlls/dinput/Makefile.in | 1 +
|
||||
dlls/dinput/dinput_main.c | 63 +++++++++++
|
||||
dlls/dinput8/Makefile.in | 17 ++-
|
||||
dlls/dinput8/dinput8_main.c | 247 --------------------------------------------
|
||||
4 files changed, 79 insertions(+), 249 deletions(-)
|
||||
delete mode 100644 dlls/dinput8/dinput8_main.c
|
||||
|
||||
diff --git a/dlls/dinput/Makefile.in b/dlls/dinput/Makefile.in
|
||||
index 5d287a3..b1107ee 100644
|
||||
--- a/dlls/dinput/Makefile.in
|
||||
+++ b/dlls/dinput/Makefile.in
|
||||
@@ -1,6 +1,7 @@
|
||||
MODULE = dinput.dll
|
||||
IMPORTLIB = dinput
|
||||
IMPORTS = dxguid uuid comctl32 ole32 user32 advapi32
|
||||
+EXTRADEFS = -DDIRECTINPUT_VERSION=0x0700
|
||||
EXTRALIBS = $(IOKIT_LIBS) $(FORCEFEEDBACK_LIBS)
|
||||
|
||||
C_SRCS = \
|
||||
diff --git a/dlls/dinput/dinput_main.c b/dlls/dinput/dinput_main.c
|
||||
index e4538a0..d42a826 100644
|
||||
--- a/dlls/dinput/dinput_main.c
|
||||
+++ b/dlls/dinput/dinput_main.c
|
||||
@@ -164,6 +164,60 @@ HRESULT WINAPI DirectInputCreateEx(
|
||||
return DI_OK;
|
||||
}
|
||||
|
||||
+#if DIRECTINPUT_VERSION == 0x0800
|
||||
+/******************************************************************************
|
||||
+ * DirectInput8Create (DINPUT8.@)
|
||||
+ */
|
||||
+HRESULT WINAPI DECLSPEC_HOTPATCH DirectInput8Create(HINSTANCE hinst, DWORD dwVersion, REFIID riid, LPVOID *ppDI, LPUNKNOWN punkOuter)
|
||||
+{
|
||||
+ IDirectInputImpl *This;
|
||||
+ HRESULT hr;
|
||||
+
|
||||
+ TRACE("hInst (%p), dwVersion: %d, riid (%s), punkOuter (%p)\n", hinst, dwVersion, debugstr_guid(riid), punkOuter);
|
||||
+
|
||||
+ if (!ppDI)
|
||||
+ return E_POINTER;
|
||||
+
|
||||
+ if (!IsEqualGUID(&IID_IDirectInput8A, riid) &&
|
||||
+ !IsEqualGUID(&IID_IDirectInput8W, riid) &&
|
||||
+ !IsEqualGUID(&IID_IUnknown, riid))
|
||||
+ {
|
||||
+ *ppDI = NULL;
|
||||
+ return DIERR_NOINTERFACE;
|
||||
+ }
|
||||
+
|
||||
+ hr = create_directinput_instance(riid, ppDI, &This);
|
||||
+
|
||||
+ if (FAILED(hr)) {
|
||||
+ ERR("CoCreateInstance failed with hr = 0x%08x\n", hr);
|
||||
+ return hr;
|
||||
+ }
|
||||
+
|
||||
+ /* When aggregation is used (punkOuter!=NULL) the application needs to manually call Initialize. */
|
||||
+ if(punkOuter == NULL && IsEqualGUID(&IID_IDirectInput8A, riid)) {
|
||||
+ hr = IDirectInput8_Initialize(&This->IDirectInput8A_iface, hinst, dwVersion);
|
||||
+ if (FAILED(hr))
|
||||
+ {
|
||||
+ IDirectInput8_Release(&This->IDirectInput8A_iface);
|
||||
+ *ppDI = NULL;
|
||||
+ return hr;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if(punkOuter == NULL && IsEqualGUID(&IID_IDirectInput8W, riid)) {
|
||||
+ hr = IDirectInput8_Initialize(&This->IDirectInput8W_iface, hinst, dwVersion);
|
||||
+ if (FAILED(hr))
|
||||
+ {
|
||||
+ IDirectInput8_Release(&This->IDirectInput8W_iface);
|
||||
+ *ppDI = NULL;
|
||||
+ return hr;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return S_OK;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
/******************************************************************************
|
||||
* DirectInputCreateA (DINPUT.@)
|
||||
*/
|
||||
@@ -1513,6 +1567,7 @@ static HRESULT WINAPI DICF_CreateInstance(
|
||||
IClassFactoryImpl *This = impl_from_IClassFactory(iface);
|
||||
|
||||
TRACE("(%p)->(%p,%s,%p)\n",This,pOuter,debugstr_guid(riid),ppobj);
|
||||
+#if DIRECTINPUT_VERSION < 0x0800
|
||||
if ( IsEqualGUID( &IID_IUnknown, riid ) ||
|
||||
IsEqualGUID( &IID_IDirectInputA, riid ) ||
|
||||
IsEqualGUID( &IID_IDirectInputW, riid ) ||
|
||||
@@ -1522,6 +1577,13 @@ static HRESULT WINAPI DICF_CreateInstance(
|
||||
IsEqualGUID( &IID_IDirectInput7W, riid ) ) {
|
||||
return create_directinput_instance(riid, ppobj, NULL);
|
||||
}
|
||||
+#else
|
||||
+ if( IsEqualGUID( &IID_IDirectInput8A, riid ) ||
|
||||
+ IsEqualGUID( &IID_IDirectInput8W, riid ) ||
|
||||
+ IsEqualGUID( &IID_IUnknown, riid )) {
|
||||
+ return create_directinput_instance(riid, ppobj, NULL);
|
||||
+ }
|
||||
+#endif
|
||||
|
||||
FIXME("(%p,%p,%s,%p) Interface not found!\n",This,pOuter,debugstr_guid(riid),ppobj);
|
||||
return E_NOINTERFACE;
|
||||
@@ -1833,3 +1895,4 @@ BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved)
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
+
|
||||
diff --git a/dlls/dinput8/Makefile.in b/dlls/dinput8/Makefile.in
|
||||
index 26672ae..6b62969 100644
|
||||
--- a/dlls/dinput8/Makefile.in
|
||||
+++ b/dlls/dinput8/Makefile.in
|
||||
@@ -1,9 +1,22 @@
|
||||
MODULE = dinput8.dll
|
||||
IMPORTLIB = dinput8
|
||||
-IMPORTS = uuid dxguid dinput ole32 advapi32
|
||||
+IMPORTS = dxguid uuid comctl32 ole32 user32 advapi32
|
||||
+EXTRADEFS = -DDIRECTINPUT_VERSION=0x0800
|
||||
+EXTRALIBS = $(IOKIT_LIBS) $(FORCEFEEDBACK_LIBS)
|
||||
+PARENTSRC = ../dinput
|
||||
|
||||
C_SRCS = \
|
||||
- dinput8_main.c
|
||||
+ config.c \
|
||||
+ data_formats.c \
|
||||
+ device.c \
|
||||
+ dinput_main.c \
|
||||
+ effect_linuxinput.c \
|
||||
+ joystick.c \
|
||||
+ joystick_linux.c \
|
||||
+ joystick_linuxinput.c \
|
||||
+ joystick_osx.c \
|
||||
+ keyboard.c \
|
||||
+ mouse.c
|
||||
|
||||
IDL_SRCS = dinput8.idl
|
||||
|
||||
diff --git a/dlls/dinput8/dinput8_main.c b/dlls/dinput8/dinput8_main.c
|
||||
deleted file mode 100644
|
||||
index 9824c76..0000000
|
||||
--- a/dlls/dinput8/dinput8_main.c
|
||||
+++ /dev/null
|
||||
@@ -1,247 +0,0 @@
|
||||
-/* DirectInput 8
|
||||
- *
|
||||
- * Copyright 2002 TransGaming Technologies Inc.
|
||||
- * Copyright 2006 Roderick Colenbrander
|
||||
- *
|
||||
- * This library is free software; you can redistribute it and/or
|
||||
- * modify it under the terms of the GNU Lesser General Public
|
||||
- * License as published by the Free Software Foundation; either
|
||||
- * version 2.1 of the License, or (at your option) any later version.
|
||||
- *
|
||||
- * This library is distributed in the hope that it will be useful,
|
||||
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
- * Lesser General Public License for more details.
|
||||
- *
|
||||
- * You should have received a copy of the GNU Lesser General Public
|
||||
- * License along with this library; if not, write to the Free Software
|
||||
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
- */
|
||||
-
|
||||
-#include "config.h"
|
||||
-#include <assert.h>
|
||||
-#include <stdarg.h>
|
||||
-#include <string.h>
|
||||
-
|
||||
-#define COBJMACROS
|
||||
-
|
||||
-#include "wine/debug.h"
|
||||
-#include "windef.h"
|
||||
-#include "winbase.h"
|
||||
-#include "winerror.h"
|
||||
-#include "objbase.h"
|
||||
-#include "rpcproxy.h"
|
||||
-#include "dinput.h"
|
||||
-
|
||||
-WINE_DEFAULT_DEBUG_CHANNEL(dinput);
|
||||
-
|
||||
-static HINSTANCE instance;
|
||||
-static LONG dll_count;
|
||||
-
|
||||
-/*
|
||||
- * Dll lifetime tracking declaration
|
||||
- */
|
||||
-static void LockModule(void)
|
||||
-{
|
||||
- InterlockedIncrement(&dll_count);
|
||||
-}
|
||||
-
|
||||
-static void UnlockModule(void)
|
||||
-{
|
||||
- InterlockedDecrement(&dll_count);
|
||||
-}
|
||||
-
|
||||
-/******************************************************************************
|
||||
- * DirectInput8Create (DINPUT8.@)
|
||||
- */
|
||||
-HRESULT WINAPI DECLSPEC_HOTPATCH DirectInput8Create(HINSTANCE hinst, DWORD dwVersion, REFIID riid, LPVOID *ppDI, LPUNKNOWN punkOuter) {
|
||||
- IDirectInputA *pDI;
|
||||
- HRESULT hr, hrCo;
|
||||
-
|
||||
- TRACE("hInst (%p), dwVersion: %d, riid (%s), punkOuter (%p)\n", hinst, dwVersion, debugstr_guid(riid), punkOuter);
|
||||
-
|
||||
- if (!ppDI)
|
||||
- return E_POINTER;
|
||||
-
|
||||
- if (!IsEqualGUID(&IID_IDirectInput8A, riid) &&
|
||||
- !IsEqualGUID(&IID_IDirectInput8W, riid) &&
|
||||
- !IsEqualGUID(&IID_IUnknown, riid))
|
||||
- {
|
||||
- *ppDI = NULL;
|
||||
- return DIERR_NOINTERFACE;
|
||||
- }
|
||||
-
|
||||
- hrCo = CoInitialize(NULL);
|
||||
-
|
||||
- hr = CoCreateInstance(&CLSID_DirectInput, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectInputA, (void **)&pDI);
|
||||
-
|
||||
- /* Ensure balance of calls. */
|
||||
- if (SUCCEEDED(hrCo))
|
||||
- CoUninitialize();
|
||||
-
|
||||
- if (FAILED(hr)) {
|
||||
- ERR("CoCreateInstance failed with hr = 0x%08x\n", hr);
|
||||
- return hr;
|
||||
- }
|
||||
-
|
||||
- hr = IDirectInput_QueryInterface(pDI, riid, ppDI);
|
||||
- IDirectInput_Release(pDI);
|
||||
-
|
||||
- if (FAILED(hr))
|
||||
- return hr;
|
||||
-
|
||||
- /* When aggregation is used (punkOuter!=NULL) the application needs to manually call Initialize. */
|
||||
- if(punkOuter == NULL && IsEqualGUID(&IID_IDirectInput8A, riid)) {
|
||||
- IDirectInput8A *DI = *ppDI;
|
||||
-
|
||||
- hr = IDirectInput8_Initialize(DI, hinst, dwVersion);
|
||||
- if (FAILED(hr))
|
||||
- {
|
||||
- IDirectInput8_Release(DI);
|
||||
- *ppDI = NULL;
|
||||
- return hr;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- if(punkOuter == NULL && IsEqualGUID(&IID_IDirectInput8W, riid)) {
|
||||
- IDirectInput8W *DI = *ppDI;
|
||||
-
|
||||
- hr = IDirectInput8_Initialize(DI, hinst, dwVersion);
|
||||
- if (FAILED(hr))
|
||||
- {
|
||||
- IDirectInput8_Release(DI);
|
||||
- *ppDI = NULL;
|
||||
- return hr;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- return S_OK;
|
||||
-}
|
||||
-
|
||||
-/*******************************************************************************
|
||||
- * DirectInput8 ClassFactory
|
||||
- */
|
||||
-typedef struct
|
||||
-{
|
||||
- /* IUnknown fields */
|
||||
- IClassFactory IClassFactory_iface;
|
||||
-} IClassFactoryImpl;
|
||||
-
|
||||
-static inline IClassFactoryImpl *impl_from_IClassFactory(IClassFactory *iface)
|
||||
-{
|
||||
- return CONTAINING_RECORD(iface, IClassFactoryImpl, IClassFactory_iface);
|
||||
-}
|
||||
-
|
||||
-static HRESULT WINAPI DI8CF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj) {
|
||||
- IClassFactoryImpl *This = impl_from_IClassFactory(iface);
|
||||
- FIXME("%p %s %p\n",This,debugstr_guid(riid),ppobj);
|
||||
- return E_NOINTERFACE;
|
||||
-}
|
||||
-
|
||||
-static ULONG WINAPI DI8CF_AddRef(LPCLASSFACTORY iface) {
|
||||
- LockModule();
|
||||
- return 2;
|
||||
-}
|
||||
-
|
||||
-static ULONG WINAPI DI8CF_Release(LPCLASSFACTORY iface) {
|
||||
- UnlockModule();
|
||||
- return 1;
|
||||
-}
|
||||
-
|
||||
-static HRESULT WINAPI DI8CF_CreateInstance(LPCLASSFACTORY iface,LPUNKNOWN pOuter,REFIID riid,LPVOID *ppobj) {
|
||||
- IClassFactoryImpl *This = impl_from_IClassFactory(iface);
|
||||
-
|
||||
- TRACE("(%p)->(%p,%s,%p)\n",This,pOuter,debugstr_guid(riid),ppobj);
|
||||
- if( IsEqualGUID( &IID_IDirectInput8A, riid ) || IsEqualGUID( &IID_IDirectInput8W, riid ) || IsEqualGUID( &IID_IUnknown, riid )) {
|
||||
- IDirectInputA *ppDI;
|
||||
- HRESULT hr;
|
||||
-
|
||||
- hr = CoCreateInstance(&CLSID_DirectInput, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectInputA, (void **)&ppDI);
|
||||
- if (FAILED(hr))
|
||||
- return hr;
|
||||
-
|
||||
- hr = IDirectInput_QueryInterface(ppDI, riid, ppobj);
|
||||
- IDirectInput_Release(ppDI);
|
||||
-
|
||||
- return hr;
|
||||
- }
|
||||
-
|
||||
- ERR("(%p,%p,%s,%p) Interface not found!\n",This,pOuter,debugstr_guid(riid),ppobj);
|
||||
- return E_NOINTERFACE;
|
||||
-}
|
||||
-
|
||||
-static HRESULT WINAPI DI8CF_LockServer(LPCLASSFACTORY iface,BOOL dolock) {
|
||||
- TRACE("(%p)->(%d)\n", iface, dolock);
|
||||
-
|
||||
- if(dolock)
|
||||
- LockModule();
|
||||
- else
|
||||
- UnlockModule();
|
||||
-
|
||||
- return S_OK;
|
||||
-}
|
||||
-
|
||||
-static const IClassFactoryVtbl DI8CF_Vtbl = {
|
||||
- DI8CF_QueryInterface,
|
||||
- DI8CF_AddRef,
|
||||
- DI8CF_Release,
|
||||
- DI8CF_CreateInstance,
|
||||
- DI8CF_LockServer
|
||||
-};
|
||||
-static IClassFactoryImpl DINPUT8_CF = { { &DI8CF_Vtbl } };
|
||||
-
|
||||
-
|
||||
-/***********************************************************************
|
||||
- * DllCanUnloadNow (DINPUT8.@)
|
||||
- */
|
||||
-HRESULT WINAPI DllCanUnloadNow(void)
|
||||
-{
|
||||
- return dll_count == 0 ? S_OK : S_FALSE;
|
||||
-}
|
||||
-
|
||||
-/***********************************************************************
|
||||
- * DllGetClassObject (DINPUT8.@)
|
||||
- */
|
||||
-HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
|
||||
-{
|
||||
- TRACE("(%s,%s,%p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
|
||||
- if ( IsEqualCLSID( &IID_IClassFactory, riid ) ) {
|
||||
- *ppv = &DINPUT8_CF;
|
||||
- IClassFactory_AddRef((IClassFactory*)*ppv);
|
||||
- return S_OK;
|
||||
- }
|
||||
-
|
||||
- FIXME("(%s,%s,%p): no interface found.\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
|
||||
- return CLASS_E_CLASSNOTAVAILABLE;
|
||||
-}
|
||||
-
|
||||
-/***********************************************************************
|
||||
- * DllMain
|
||||
- */
|
||||
-BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD reason, LPVOID lpv)
|
||||
-{
|
||||
- switch (reason)
|
||||
- {
|
||||
- case DLL_PROCESS_ATTACH:
|
||||
- instance = hInstDLL;
|
||||
- DisableThreadLibraryCalls( hInstDLL );
|
||||
- break;
|
||||
- }
|
||||
- return TRUE;
|
||||
-}
|
||||
-
|
||||
-/***********************************************************************
|
||||
- * DllRegisterServer (DINPUT8.@)
|
||||
- */
|
||||
-HRESULT WINAPI DllRegisterServer(void)
|
||||
-{
|
||||
- return __wine_register_resources( instance );
|
||||
-}
|
||||
-
|
||||
-/***********************************************************************
|
||||
- * DllUnregisterServer (DINPUT8.@)
|
||||
- */
|
||||
-HRESULT WINAPI DllUnregisterServer(void)
|
||||
-{
|
||||
- return __wine_unregister_resources( instance );
|
||||
-}
|
||||
--
|
||||
1.9.1
|
||||
|
1
patches/dinput8-shared-code/definition
Normal file
1
patches/dinput8-shared-code/definition
Normal file
@@ -0,0 +1 @@
|
||||
Fixes: [45568] League of Legends 8.12+ fails to start a game (anticheat engine, validation of loaded DLLs)
|
@@ -0,0 +1,77 @@
|
||||
From e2978c13fca913a14991e286c463ede69f61831d Mon Sep 17 00:00:00 2001
|
||||
From: Lucian Poston <lucianposton@pm.me>
|
||||
Date: Sun, 20 May 2018 21:40:39 -0700
|
||||
Subject: [PATCH 1/6] dwrite: Test IDWriteTextFormat with nonexistent font
|
||||
|
||||
Signed-off-by: Lucian Poston <lucianposton@pm.me>
|
||||
---
|
||||
dlls/dwrite/tests/layout.c | 46 ++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 46 insertions(+)
|
||||
|
||||
diff --git a/dlls/dwrite/tests/layout.c b/dlls/dwrite/tests/layout.c
|
||||
index 652f6b78ac..4198b8a1b1 100644
|
||||
--- a/dlls/dwrite/tests/layout.c
|
||||
+++ b/dlls/dwrite/tests/layout.c
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "wine/test.h"
|
||||
|
||||
static const WCHAR tahomaW[] = {'T','a','h','o','m','a',0};
|
||||
+static const WCHAR nonExistentFontW[] = {'B','l','a','h','!',0};
|
||||
static const WCHAR enusW[] = {'e','n','-','u','s',0};
|
||||
|
||||
struct testanalysissink
|
||||
@@ -3292,6 +3293,51 @@ todo_wine
|
||||
ok(metrics.lineCount == 1, "got %u\n", metrics.lineCount);
|
||||
IDWriteTextLayout_Release(layout);
|
||||
|
||||
+ IDWriteTextFormat_Release(format);
|
||||
+
|
||||
+ /* nonexistent font */
|
||||
+ hr = IDWriteFactory_CreateTextFormat(factory, nonExistentFontW, NULL, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL,
|
||||
+ DWRITE_FONT_STRETCH_NORMAL, 10.0, enusW, &format);
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+
|
||||
+ hr = IDWriteFactory_CreateTextLayout(factory, strW, 4, format, 500.0, 1000.0, &layout);
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+
|
||||
+ count = 0;
|
||||
+ hr = IDWriteTextLayout_GetClusterMetrics(layout, clusters, 4, &count);
|
||||
+todo_wine
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+todo_wine
|
||||
+ ok(count == 4, "got %u\n", count);
|
||||
+ for (i = 0, width = 0.0; i < count; i++)
|
||||
+ width += clusters[i].width;
|
||||
+
|
||||
+ memset(&metrics, 0xcc, sizeof(metrics));
|
||||
+ hr = IDWriteTextLayout_GetMetrics(layout, &metrics);
|
||||
+todo_wine
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+todo_wine
|
||||
+ ok(metrics.left == 0.0, "got %.2f\n", metrics.left);
|
||||
+todo_wine
|
||||
+ ok(metrics.top == 0.0, "got %.2f\n", metrics.top);
|
||||
+todo_wine
|
||||
+ ok(metrics.width == width, "got %.2f, expected %.2f\n", metrics.width, width);
|
||||
+todo_wine
|
||||
+ ok(metrics.widthIncludingTrailingWhitespace == width, "got %.2f, expected %.2f\n",
|
||||
+ metrics.widthIncludingTrailingWhitespace, width);
|
||||
+todo_wine
|
||||
+ ok(metrics.height > 0.0, "got %.2f\n", metrics.height);
|
||||
+todo_wine
|
||||
+ ok(metrics.layoutWidth == 500.0, "got %.2f\n", metrics.layoutWidth);
|
||||
+todo_wine
|
||||
+ ok(metrics.layoutHeight == 1000.0, "got %.2f\n", metrics.layoutHeight);
|
||||
+todo_wine
|
||||
+ ok(metrics.maxBidiReorderingDepth == 1, "got %u\n", metrics.maxBidiReorderingDepth);
|
||||
+todo_wine
|
||||
+ ok(metrics.lineCount == 1, "got %u\n", metrics.lineCount);
|
||||
+
|
||||
+ IDWriteTextLayout_Release(layout);
|
||||
+
|
||||
IDWriteTextFormat_Release(format);
|
||||
IDWriteFactory_Release(factory);
|
||||
}
|
||||
--
|
||||
2.18.0
|
||||
|
@@ -1,79 +0,0 @@
|
||||
From cd1fcc1f8bc4b196304930254dc87ce34f6e9558 Mon Sep 17 00:00:00 2001
|
||||
From: Lucian Poston <lucian.poston@gmail.com>
|
||||
Date: Mon, 20 Nov 2017 20:50:19 -0800
|
||||
Subject: [PATCH 1/2] dwrite: test font collection fallback logic
|
||||
|
||||
https://bugs.winehq.org/show_bug.cgi?id=44052
|
||||
|
||||
Signed-off-by: Lucian Poston <lucian.poston@gmail.com>
|
||||
---
|
||||
dlls/dwrite/tests/font.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 46 insertions(+)
|
||||
|
||||
diff --git a/dlls/dwrite/tests/font.c b/dlls/dwrite/tests/font.c
|
||||
index c226dba..ae386e6 100644
|
||||
--- a/dlls/dwrite/tests/font.c
|
||||
+++ b/dlls/dwrite/tests/font.c
|
||||
@@ -2926,6 +2926,51 @@ todo_wine
|
||||
ok(ref == 0, "factory not released, %u\n", ref);
|
||||
}
|
||||
|
||||
+static void test_CustomFontCollection_fallback(void)
|
||||
+{
|
||||
+ static const WCHAR strW[] = {'a','b','c','d',0};
|
||||
+ static const WCHAR enusW[] = {'e','n','-','u','s',0};
|
||||
+ IDWriteFontCollectionLoader *loader;
|
||||
+ IDWriteTextFormat *format;
|
||||
+ IDWriteTextLayout *layout;
|
||||
+ IDWriteFactory *factory;
|
||||
+ LONG font_coll_key = 1;
|
||||
+ IDWriteFontCollection *font_collection;
|
||||
+ DWRITE_TEXT_METRICS metrics;
|
||||
+ HRESULT hr;
|
||||
+
|
||||
+ factory = create_factory();
|
||||
+ loader = create_collection_loader();
|
||||
+ hr = IDWriteFactory_RegisterFontCollectionLoader(factory, loader);
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+
|
||||
+ hr = IDWriteFactory_CreateCustomFontCollection(factory, loader,
|
||||
+ &font_coll_key, sizeof(font_coll_key), &font_collection);
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+
|
||||
+ hr = IDWriteFactory_CreateTextFormat(factory, tahomaW, font_collection,
|
||||
+ DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL,
|
||||
+ DWRITE_FONT_STRETCH_NORMAL, 10.0, enusW, &format);
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+
|
||||
+ hr = IDWriteFactory_CreateTextLayout(factory, strW, 4, format,
|
||||
+ 1000.0, 1000.0, &layout);
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+
|
||||
+ hr = IDWriteTextLayout_GetMetrics(layout, &metrics);
|
||||
+ todo_wine
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+
|
||||
+ hr = IDWriteFactory_UnregisterFontCollectionLoader(factory, loader);
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+
|
||||
+ IDWriteFontCollectionLoader_Release(loader);
|
||||
+ IDWriteFontCollection_Release(font_collection);
|
||||
+ IDWriteTextFormat_Release(format);
|
||||
+ IDWriteTextLayout_Release(layout);
|
||||
+ IDWriteFactory_Release(factory);
|
||||
+}
|
||||
+
|
||||
static HRESULT WINAPI fontfileloader_QueryInterface(IDWriteFontFileLoader *iface, REFIID riid, void **obj)
|
||||
{
|
||||
if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IDWriteFontFileLoader))
|
||||
@@ -8459,6 +8504,7 @@ START_TEST(font)
|
||||
test_system_fontcollection();
|
||||
test_ConvertFontFaceToLOGFONT();
|
||||
test_CustomFontCollection();
|
||||
+ test_CustomFontCollection_fallback();
|
||||
test_CreateCustomFontFileReference();
|
||||
test_CreateFontFileReference();
|
||||
test_shared_isolated();
|
||||
--
|
||||
1.9.1
|
||||
|
@@ -1,88 +0,0 @@
|
||||
From 3f165554d6ca5dc9a1606794d9b0824796714c03 Mon Sep 17 00:00:00 2001
|
||||
From: Lucian Poston <lucian.poston@gmail.com>
|
||||
Date: Fri, 17 Nov 2017 17:28:34 -0800
|
||||
Subject: [PATCH 2/2] dwrite: Fix font fallback
|
||||
|
||||
https://bugs.winehq.org/show_bug.cgi?id=44052
|
||||
|
||||
Signed-off-by: Lucian Poston <lucian.poston@gmail.com>
|
||||
---
|
||||
dlls/dwrite/analyzer.c | 15 +++++++++++----
|
||||
dlls/dwrite/layout.c | 15 +++++++++++----
|
||||
dlls/dwrite/tests/font.c | 1 -
|
||||
3 files changed, 22 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/dlls/dwrite/analyzer.c b/dlls/dwrite/analyzer.c
|
||||
index 8d553c6..1659b56 100644
|
||||
--- a/dlls/dwrite/analyzer.c
|
||||
+++ b/dlls/dwrite/analyzer.c
|
||||
@@ -2139,15 +2139,22 @@ static HRESULT WINAPI fontfallback_MapCharacters(IDWriteFontFallback *iface, IDW
|
||||
if (length == 0)
|
||||
return S_OK;
|
||||
|
||||
- if (!basecollection)
|
||||
- basecollection = (IDWriteFontCollection*)fallback->systemcollection;
|
||||
-
|
||||
hr = get_text_source_ptr(source, position, length, &text, &buff);
|
||||
if (FAILED(hr))
|
||||
goto done;
|
||||
|
||||
if (basefamily && *basefamily) {
|
||||
- hr = create_matching_font(basecollection, basefamily, weight, style, stretch, ret_font);
|
||||
+ if (basecollection)
|
||||
+ {
|
||||
+ hr = create_matching_font(basecollection, basefamily, weight, style, stretch, ret_font);
|
||||
+ }
|
||||
+
|
||||
+ if (!basecollection || FAILED(hr))
|
||||
+ {
|
||||
+ hr = create_matching_font((IDWriteFontCollection*)fallback->systemcollection,
|
||||
+ basefamily, weight, style, stretch, ret_font);
|
||||
+ }
|
||||
+
|
||||
if (FAILED(hr))
|
||||
goto done;
|
||||
|
||||
diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c
|
||||
index 104b039..fefe14c 100644
|
||||
--- a/dlls/dwrite/layout.c
|
||||
+++ b/dlls/dwrite/layout.c
|
||||
@@ -830,12 +830,19 @@ static HRESULT layout_resolve_fonts(struct dwrite_textlayout *layout)
|
||||
range = get_layout_range_by_pos(layout, run->descr.textPosition);
|
||||
|
||||
if (run->sa.shapes == DWRITE_SCRIPT_SHAPES_NO_VISUAL) {
|
||||
- IDWriteFontCollection *collection;
|
||||
+ if (range->collection) {
|
||||
+ hr = create_matching_font(range->collection, range->fontfamily,
|
||||
+ range->weight, range->style, range->stretch, &font);
|
||||
+ }
|
||||
|
||||
- collection = range->collection ? range->collection : sys_collection;
|
||||
+ if (range->collection == NULL || FAILED(hr))
|
||||
+ {
|
||||
+ hr = create_matching_font(sys_collection, range->fontfamily,
|
||||
+ range->weight, range->style, range->stretch, &font);
|
||||
+ }
|
||||
|
||||
- if (FAILED(hr = create_matching_font(collection, range->fontfamily, range->weight, range->style,
|
||||
- range->stretch, &font))) {
|
||||
+ if (FAILED(hr))
|
||||
+ {
|
||||
WARN("%s: failed to create matching font for non visual run, family %s, collection %p\n",
|
||||
debugstr_rundescr(&run->descr), debugstr_w(range->fontfamily), range->collection);
|
||||
break;
|
||||
diff --git a/dlls/dwrite/tests/font.c b/dlls/dwrite/tests/font.c
|
||||
index ae386e6..cf0856f 100644
|
||||
--- a/dlls/dwrite/tests/font.c
|
||||
+++ b/dlls/dwrite/tests/font.c
|
||||
@@ -2958,7 +2958,6 @@ static void test_CustomFontCollection_fallback(void)
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
|
||||
hr = IDWriteTextLayout_GetMetrics(layout, &metrics);
|
||||
- todo_wine
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
|
||||
hr = IDWriteFactory_UnregisterFontCollectionLoader(factory, loader);
|
||||
--
|
||||
1.9.1
|
||||
|
@@ -0,0 +1,323 @@
|
||||
From 22fd0a86b6be3d2e203beee7a0b55f717f32436b Mon Sep 17 00:00:00 2001
|
||||
From: Lucian Poston <lucianposton@pm.me>
|
||||
Date: Wed, 23 May 2018 00:01:42 -0700
|
||||
Subject: [PATCH 2/6] dwrite: Test GetMetrics with custom fontcollection
|
||||
|
||||
Signed-off-by: Lucian Poston <lucianposton@pm.me>
|
||||
---
|
||||
dlls/dwrite/tests/layout.c | 278 +++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 278 insertions(+)
|
||||
|
||||
diff --git a/dlls/dwrite/tests/layout.c b/dlls/dwrite/tests/layout.c
|
||||
index 4198b8a1b1..7542cad8d7 100644
|
||||
--- a/dlls/dwrite/tests/layout.c
|
||||
+++ b/dlls/dwrite/tests/layout.c
|
||||
@@ -4489,6 +4489,7 @@ static void test_SetWordWrapping(void)
|
||||
/* Collection dedicated to fallback testing */
|
||||
|
||||
static const WCHAR g_blahfontW[] = {'B','l','a','h',0};
|
||||
+static const WCHAR g_fontNotInCollectionW[] = {'n','o','t','B','l','a','h',0};
|
||||
static HRESULT WINAPI fontcollection_QI(IDWriteFontCollection *iface, REFIID riid, void **obj)
|
||||
{
|
||||
if (IsEqualIID(riid, &IID_IDWriteFontCollection) || IsEqualIID(riid, &IID_IUnknown)) {
|
||||
@@ -4548,6 +4549,9 @@ static HRESULT WINAPI fontcollection_FindFamilyName(IDWriteFontCollection *iface
|
||||
*index = 123456;
|
||||
*exists = TRUE;
|
||||
return S_OK;
|
||||
+ } else if (!lstrcmpW(name, g_fontNotInCollectionW)) {
|
||||
+ *exists = FALSE;
|
||||
+ return S_OK;
|
||||
}
|
||||
ok(0, "unexpected call, name %s\n", wine_dbgstr_w(name));
|
||||
return E_NOTIMPL;
|
||||
@@ -5568,6 +5572,279 @@ static void test_GetOverhangMetrics(void)
|
||||
IDWriteFactory_Release(factory);
|
||||
}
|
||||
|
||||
+static void test_GetMetrics_with_custom_fontcollection(void)
|
||||
+{
|
||||
+ static const WCHAR emptystringW[] = {0};
|
||||
+ static const WCHAR mappedW[] = {'a','b','c','d',0};
|
||||
+ static const WCHAR notmappedW[] = {'a',0xffff,'b',0}; // u+ffff = not a unicode character
|
||||
+ DWRITE_CLUSTER_METRICS clusters[4];
|
||||
+ DWRITE_TEXT_METRICS metrics;
|
||||
+ IDWriteTextFormat *format;
|
||||
+ IDWriteTextLayout *layout;
|
||||
+ IDWriteFactory *factory;
|
||||
+ UINT32 count, i;
|
||||
+ FLOAT width;
|
||||
+ HRESULT hr;
|
||||
+
|
||||
+ factory = create_factory();
|
||||
+
|
||||
+ /* font is in font collection */
|
||||
+ hr = IDWriteFactory_CreateTextFormat(factory, g_blahfontW, &fallbackcollection,
|
||||
+ DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL,
|
||||
+ DWRITE_FONT_STRETCH_NORMAL, 10.0, enusW, &format);
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+
|
||||
+ /* text is mapped by fontfallback */
|
||||
+ hr = IDWriteFactory_CreateTextLayout(factory, mappedW, 4, format, 1000.0, 1000.0, &layout);
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+ count = 9999;
|
||||
+ hr = IDWriteTextLayout_GetClusterMetrics(layout, clusters, 4, &count);
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+ ok(count == 4, "got %u\n", count);
|
||||
+ for (i = 0, width = 0.0; i < count; i++)
|
||||
+ width += clusters[i].width;
|
||||
+ memset(&metrics, 0xcc, sizeof(metrics));
|
||||
+ hr = IDWriteTextLayout_GetMetrics(layout, &metrics);
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+ ok(metrics.left == 0.0, "got %.2f\n", metrics.left);
|
||||
+ ok(metrics.top == 0.0, "got %.2f\n", metrics.top);
|
||||
+ ok(metrics.width == width, "got %.2f, expected %.2f\n", metrics.width, width);
|
||||
+ ok(metrics.widthIncludingTrailingWhitespace == width, "got %.2f, expected %.2f\n",
|
||||
+ metrics.widthIncludingTrailingWhitespace, width);
|
||||
+ ok(metrics.height > 0.0, "got %.2f\n", metrics.height);
|
||||
+ ok(metrics.layoutWidth == 1000.0, "got %.2f\n", metrics.layoutWidth);
|
||||
+ ok(metrics.layoutHeight == 1000.0, "got %.2f\n", metrics.layoutHeight);
|
||||
+ ok(metrics.maxBidiReorderingDepth == 1, "got %u\n", metrics.maxBidiReorderingDepth);
|
||||
+ ok(metrics.lineCount == 1, "got %u\n", metrics.lineCount);
|
||||
+ IDWriteTextLayout_Release(layout);
|
||||
+
|
||||
+ /* text is not mapped by fontfallback */
|
||||
+ hr = IDWriteFactory_CreateTextLayout(factory, notmappedW, 4, format, 1000.0, 1000.0, &layout);
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+ count = 9999;
|
||||
+ hr = IDWriteTextLayout_GetClusterMetrics(layout, clusters, 4, &count);
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+ ok(count == 4, "got %u\n", count);
|
||||
+ for (i = 0, width = 0.0; i < count; i++)
|
||||
+ width += clusters[i].width;
|
||||
+ memset(&metrics, 0xcc, sizeof(metrics));
|
||||
+ hr = IDWriteTextLayout_GetMetrics(layout, &metrics);
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+ ok(metrics.left == 0.0, "got %.2f\n", metrics.left);
|
||||
+ ok(metrics.top == 0.0, "got %.2f\n", metrics.top);
|
||||
+ ok(metrics.width == width, "got %.2f, expected %.2f\n", metrics.width, width);
|
||||
+ ok(metrics.widthIncludingTrailingWhitespace == width, "got %.2f, expected %.2f\n",
|
||||
+ metrics.widthIncludingTrailingWhitespace, width);
|
||||
+ ok(metrics.height > 0.0, "got %.2f\n", metrics.height);
|
||||
+ ok(metrics.layoutWidth == 1000.0, "got %.2f\n", metrics.layoutWidth);
|
||||
+ ok(metrics.layoutHeight == 1000.0, "got %.2f\n", metrics.layoutHeight);
|
||||
+ ok(metrics.maxBidiReorderingDepth == 1, "got %u\n", metrics.maxBidiReorderingDepth);
|
||||
+ ok(metrics.lineCount == 1, "got %u\n", metrics.lineCount);
|
||||
+ IDWriteTextLayout_Release(layout);
|
||||
+
|
||||
+ /* empty string */
|
||||
+ hr = IDWriteFactory_CreateTextLayout(factory, emptystringW, 4, format, 1000.0, 1000.0, &layout);
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+ count = 9999;
|
||||
+ hr = IDWriteTextLayout_GetClusterMetrics(layout, clusters, 4, &count);
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+ ok(count == 4, "got %u\n", count);
|
||||
+ for (i = 0, width = 0.0; i < count; i++)
|
||||
+ width += clusters[i].width;
|
||||
+ memset(&metrics, 0xcc, sizeof(metrics));
|
||||
+ hr = IDWriteTextLayout_GetMetrics(layout, &metrics);
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+ ok(metrics.left == 0.0, "got %.2f\n", metrics.left);
|
||||
+ ok(metrics.top == 0.0, "got %.2f\n", metrics.top);
|
||||
+ ok(metrics.width == width, "got %.2f, expected %.2f\n", metrics.width, width);
|
||||
+ ok(metrics.widthIncludingTrailingWhitespace == width, "got %.2f, expected %.2f\n",
|
||||
+ metrics.widthIncludingTrailingWhitespace, width);
|
||||
+ ok(metrics.height > 0.0, "got %.2f\n", metrics.height);
|
||||
+ ok(metrics.layoutWidth == 1000.0, "got %.2f\n", metrics.layoutWidth);
|
||||
+ ok(metrics.layoutHeight == 1000.0, "got %.2f\n", metrics.layoutHeight);
|
||||
+ ok(metrics.maxBidiReorderingDepth == 1, "got %u\n", metrics.maxBidiReorderingDepth);
|
||||
+ ok(metrics.lineCount == 1, "got %u\n", metrics.lineCount);
|
||||
+ IDWriteTextLayout_Release(layout);
|
||||
+
|
||||
+ /* zero-length empty string */
|
||||
+ hr = IDWriteFactory_CreateTextLayout(factory, emptystringW, 0, format, 1000.0, 1000.0, &layout);
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+ count = 9999;
|
||||
+ hr = IDWriteTextLayout_GetClusterMetrics(layout, clusters, 4, &count);
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+ ok(count == 0, "got %u\n", count);
|
||||
+ for (i = 0, width = 0.0; i < count; i++)
|
||||
+ width += clusters[i].width;
|
||||
+ memset(&metrics, 0xcc, sizeof(metrics));
|
||||
+ hr = IDWriteTextLayout_GetMetrics(layout, &metrics);
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+ ok(metrics.left == 0.0, "got %.2f\n", metrics.left);
|
||||
+ ok(metrics.top == 0.0, "got %.2f\n", metrics.top);
|
||||
+ ok(metrics.width == width, "got %.2f, expected %.2f\n", metrics.width, width);
|
||||
+ ok(metrics.widthIncludingTrailingWhitespace == width, "got %.2f, expected %.2f\n",
|
||||
+ metrics.widthIncludingTrailingWhitespace, width);
|
||||
+ ok(metrics.height > 0.0, "got %.2f\n", metrics.height);
|
||||
+ ok(metrics.layoutWidth == 1000.0, "got %.2f\n", metrics.layoutWidth);
|
||||
+ ok(metrics.layoutHeight == 1000.0, "got %.2f\n", metrics.layoutHeight);
|
||||
+ ok(metrics.maxBidiReorderingDepth == 1, "got %u\n", metrics.maxBidiReorderingDepth);
|
||||
+ ok(metrics.lineCount == 1, "got %u\n", metrics.lineCount);
|
||||
+ IDWriteTextLayout_Release(layout);
|
||||
+
|
||||
+ IDWriteTextFormat_Release(format);
|
||||
+
|
||||
+ /* font not in font collection */
|
||||
+ hr = IDWriteFactory_CreateTextFormat(factory, g_fontNotInCollectionW, &fallbackcollection,
|
||||
+ DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL,
|
||||
+ DWRITE_FONT_STRETCH_NORMAL, 10.0, enusW, &format);
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+
|
||||
+ /* text is mapped by fontfallback */
|
||||
+ hr = IDWriteFactory_CreateTextLayout(factory, mappedW, 4, format, 1000.0, 1000.0, &layout);
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+ count = 9999;
|
||||
+ hr = IDWriteTextLayout_GetClusterMetrics(layout, clusters, 4, &count);
|
||||
+ todo_wine
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+ todo_wine
|
||||
+ ok(count == 4, "got %u\n", count);
|
||||
+ for (i = 0, width = 0.0; i < count; i++)
|
||||
+ width += clusters[i].width;
|
||||
+ memset(&metrics, 0xcc, sizeof(metrics));
|
||||
+ hr = IDWriteTextLayout_GetMetrics(layout, &metrics);
|
||||
+ todo_wine
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+ todo_wine
|
||||
+ ok(metrics.left == 0.0, "got %.2f\n", metrics.left);
|
||||
+ todo_wine
|
||||
+ ok(metrics.top == 0.0, "got %.2f\n", metrics.top);
|
||||
+ todo_wine
|
||||
+ ok(metrics.width == width, "got %.2f, expected %.2f\n", metrics.width, width);
|
||||
+ todo_wine
|
||||
+ ok(metrics.widthIncludingTrailingWhitespace == width, "got %.2f, expected %.2f\n",
|
||||
+ metrics.widthIncludingTrailingWhitespace, width);
|
||||
+ todo_wine
|
||||
+ ok(metrics.height > 0.0, "got %.2f\n", metrics.height);
|
||||
+ todo_wine
|
||||
+ ok(metrics.layoutWidth == 1000.0, "got %.2f\n", metrics.layoutWidth);
|
||||
+ todo_wine
|
||||
+ ok(metrics.layoutHeight == 1000.0, "got %.2f\n", metrics.layoutHeight);
|
||||
+ todo_wine
|
||||
+ ok(metrics.maxBidiReorderingDepth == 1, "got %u\n", metrics.maxBidiReorderingDepth);
|
||||
+ todo_wine
|
||||
+ ok(metrics.lineCount == 1, "got %u\n", metrics.lineCount);
|
||||
+ IDWriteTextLayout_Release(layout);
|
||||
+
|
||||
+ /* text is not mapped by fontfallback */
|
||||
+ hr = IDWriteFactory_CreateTextLayout(factory, notmappedW, 4, format, 1000.0, 1000.0, &layout);
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+ count = 9999;
|
||||
+ hr = IDWriteTextLayout_GetClusterMetrics(layout, clusters, 4, &count);
|
||||
+ todo_wine
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+ todo_wine
|
||||
+ ok(count == 4, "got %u\n", count);
|
||||
+ for (i = 0, width = 0.0; i < count; i++)
|
||||
+ width += clusters[i].width;
|
||||
+ memset(&metrics, 0xcc, sizeof(metrics));
|
||||
+ hr = IDWriteTextLayout_GetMetrics(layout, &metrics);
|
||||
+ todo_wine
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+ todo_wine
|
||||
+ ok(metrics.left == 0.0, "got %.2f\n", metrics.left);
|
||||
+ todo_wine
|
||||
+ ok(metrics.top == 0.0, "got %.2f\n", metrics.top);
|
||||
+ todo_wine
|
||||
+ ok(metrics.width == width, "got %.2f, expected %.2f\n", metrics.width, width);
|
||||
+ todo_wine
|
||||
+ ok(metrics.widthIncludingTrailingWhitespace == width, "got %.2f, expected %.2f\n",
|
||||
+ metrics.widthIncludingTrailingWhitespace, width);
|
||||
+ todo_wine
|
||||
+ ok(metrics.height > 0.0, "got %.2f\n", metrics.height);
|
||||
+ todo_wine
|
||||
+ ok(metrics.layoutWidth == 1000.0, "got %.2f\n", metrics.layoutWidth);
|
||||
+ todo_wine
|
||||
+ ok(metrics.layoutHeight == 1000.0, "got %.2f\n", metrics.layoutHeight);
|
||||
+ todo_wine
|
||||
+ ok(metrics.maxBidiReorderingDepth == 1, "got %u\n", metrics.maxBidiReorderingDepth);
|
||||
+ todo_wine
|
||||
+ ok(metrics.lineCount == 1, "got %u\n", metrics.lineCount);
|
||||
+ IDWriteTextLayout_Release(layout);
|
||||
+
|
||||
+ /* empty string */
|
||||
+ hr = IDWriteFactory_CreateTextLayout(factory, emptystringW, 4, format, 1000.0, 1000.0, &layout);
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+ count = 9999;
|
||||
+ hr = IDWriteTextLayout_GetClusterMetrics(layout, clusters, 4, &count);
|
||||
+ todo_wine
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+ todo_wine
|
||||
+ ok(count == 4, "got %u\n", count);
|
||||
+ for (i = 0, width = 0.0; i < count; i++)
|
||||
+ width += clusters[i].width;
|
||||
+ memset(&metrics, 0xcc, sizeof(metrics));
|
||||
+ hr = IDWriteTextLayout_GetMetrics(layout, &metrics);
|
||||
+ todo_wine
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+ todo_wine
|
||||
+ ok(metrics.left == 0.0, "got %.2f\n", metrics.left);
|
||||
+ todo_wine
|
||||
+ ok(metrics.top == 0.0, "got %.2f\n", metrics.top);
|
||||
+ todo_wine
|
||||
+ ok(metrics.width == width, "got %.2f, expected %.2f\n", metrics.width, width);
|
||||
+ todo_wine
|
||||
+ ok(metrics.widthIncludingTrailingWhitespace == width, "got %.2f, expected %.2f\n",
|
||||
+ metrics.widthIncludingTrailingWhitespace, width);
|
||||
+ todo_wine
|
||||
+ ok(metrics.height > 0.0, "got %.2f\n", metrics.height);
|
||||
+ todo_wine
|
||||
+ ok(metrics.layoutWidth == 1000.0, "got %.2f\n", metrics.layoutWidth);
|
||||
+ todo_wine
|
||||
+ ok(metrics.layoutHeight == 1000.0, "got %.2f\n", metrics.layoutHeight);
|
||||
+ todo_wine
|
||||
+ ok(metrics.maxBidiReorderingDepth == 1, "got %u\n", metrics.maxBidiReorderingDepth);
|
||||
+ todo_wine
|
||||
+ ok(metrics.lineCount == 1, "got %u\n", metrics.lineCount);
|
||||
+ IDWriteTextLayout_Release(layout);
|
||||
+
|
||||
+ /* zero-length empty string */
|
||||
+ hr = IDWriteFactory_CreateTextLayout(factory, emptystringW, 0, format, 1000.0, 1000.0, &layout);
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+ count = 9999;
|
||||
+ hr = IDWriteTextLayout_GetClusterMetrics(layout, clusters, 4, &count);
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+ ok(count == 0, "got %u\n", count);
|
||||
+ for (i = 0, width = 0.0; i < count; i++)
|
||||
+ width += clusters[i].width;
|
||||
+ memset(&metrics, 0xcc, sizeof(metrics));
|
||||
+ hr = IDWriteTextLayout_GetMetrics(layout, &metrics);
|
||||
+ todo_wine
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+ todo_wine
|
||||
+ ok(metrics.left == 0.0, "got %.2f\n", metrics.left);
|
||||
+ todo_wine
|
||||
+ ok(metrics.top == 0.0, "got %.2f\n", metrics.top);
|
||||
+ todo_wine
|
||||
+ ok(metrics.width == width, "got %.2f, expected %.2f\n", metrics.width, width);
|
||||
+ todo_wine
|
||||
+ ok(metrics.widthIncludingTrailingWhitespace == width, "got %.2f, expected %.2f\n",
|
||||
+ metrics.widthIncludingTrailingWhitespace, width);
|
||||
+ todo_wine
|
||||
+ ok(metrics.height > 0.0, "got %.2f\n", metrics.height);
|
||||
+ todo_wine
|
||||
+ ok(metrics.layoutWidth == 1000.0, "got %.2f\n", metrics.layoutWidth);
|
||||
+ todo_wine
|
||||
+ ok(metrics.layoutHeight == 1000.0, "got %.2f\n", metrics.layoutHeight);
|
||||
+ todo_wine
|
||||
+ ok(metrics.maxBidiReorderingDepth == 1, "got %u\n", metrics.maxBidiReorderingDepth);
|
||||
+ todo_wine
|
||||
+ ok(metrics.lineCount == 1, "got %u\n", metrics.lineCount);
|
||||
+ IDWriteTextLayout_Release(layout);
|
||||
+
|
||||
+ IDWriteTextFormat_Release(format);
|
||||
+
|
||||
+ IDWriteFactory_Release(factory);
|
||||
+}
|
||||
+
|
||||
START_TEST(layout)
|
||||
{
|
||||
IDWriteFactory *factory;
|
||||
@@ -5601,6 +5878,7 @@ START_TEST(layout)
|
||||
test_SetFontStretch();
|
||||
test_SetStrikethrough();
|
||||
test_GetMetrics();
|
||||
+ test_GetMetrics_with_custom_fontcollection();
|
||||
test_SetFlowDirection();
|
||||
test_SetDrawingEffect();
|
||||
test_GetLineMetrics();
|
||||
--
|
||||
2.18.0
|
||||
|
@@ -0,0 +1,42 @@
|
||||
From ffc4081c4705362d89632dc82ed251c440e1c00f Mon Sep 17 00:00:00 2001
|
||||
From: Lucian Poston <lucianposton@pm.me>
|
||||
Date: Mon, 21 May 2018 19:40:03 -0700
|
||||
Subject: [PATCH 3/6] dwrite: Skip failing font metrics test for Goha
|
||||
|
||||
Signed-off-by: Lucian Poston <lucianposton@pm.me>
|
||||
---
|
||||
dlls/dwrite/tests/layout.c | 11 ++++++++---
|
||||
1 file changed, 8 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/dwrite/tests/layout.c b/dlls/dwrite/tests/layout.c
|
||||
index 7542cad8d7..c8f3f5a00f 100644
|
||||
--- a/dlls/dwrite/tests/layout.c
|
||||
+++ b/dlls/dwrite/tests/layout.c
|
||||
@@ -620,6 +620,7 @@ static HRESULT WINAPI testrenderer_DrawUnderline(IDWriteTextRenderer *iface,
|
||||
{
|
||||
struct renderer_context *ctxt = (struct renderer_context*)context;
|
||||
struct drawcall_entry entry = { 0 };
|
||||
+ static const WCHAR gohaW[] = {'G','o','h','a','-','T','i','b','e','b',' ','Z','e','m','e','n',0};
|
||||
|
||||
if (ctxt)
|
||||
TEST_MEASURING_MODE(ctxt, underline->measuringMode);
|
||||
@@ -635,9 +636,13 @@ static HRESULT WINAPI testrenderer_DrawUnderline(IDWriteTextRenderer *iface,
|
||||
IDWriteFontFace_GetMetrics(fontface, &metrics);
|
||||
|
||||
ok(emsize == metrics.designUnitsPerEm, "Unexpected font size %f\n", emsize);
|
||||
- /* Expected height is in design units, allow some absolute difference from it. Seems to only happen on Vista */
|
||||
- ok(fabs(metrics.capHeight - underline->runHeight) < 2.0f, "Expected runHeight %u, got %f, family %s\n",
|
||||
- metrics.capHeight, underline->runHeight, wine_dbgstr_w(ctxt->familyW));
|
||||
+ if (lstrcmpW(gohaW, ctxt->familyW)) {
|
||||
+ /* Expected height is in design units, allow some absolute difference from it. Seems to only happen on Vista */
|
||||
+ ok(fabs(metrics.capHeight - underline->runHeight) < 2.0f, "Expected runHeight %u, got %f, family %s\n",
|
||||
+ metrics.capHeight, underline->runHeight, wine_dbgstr_w(ctxt->familyW));
|
||||
+ } else {
|
||||
+ skip("%s is an invalid font, rejected by windows.\n", wine_dbgstr_w(gohaW));
|
||||
+ }
|
||||
|
||||
IDWriteFontFace_Release(fontface);
|
||||
}
|
||||
--
|
||||
2.18.0
|
||||
|
@@ -0,0 +1,352 @@
|
||||
From add69d1d24330592891222674844dccf104d6d73 Mon Sep 17 00:00:00 2001
|
||||
From: Lucian Poston <lucianposton@pm.me>
|
||||
Date: Mon, 21 May 2018 18:13:00 -0700
|
||||
Subject: [PATCH 4/6] dwrite: Use font fallback when mapping characters
|
||||
|
||||
Signed-off-by: Lucian Poston <lucianposton@pm.me>
|
||||
---
|
||||
dlls/dwrite/analyzer.c | 77 +++++++++++++++++++++++-------
|
||||
dlls/dwrite/layout.c | 6 +++
|
||||
dlls/dwrite/tests/layout.c | 97 +++++++++++++-------------------------
|
||||
3 files changed, 98 insertions(+), 82 deletions(-)
|
||||
|
||||
diff --git a/dlls/dwrite/analyzer.c b/dlls/dwrite/analyzer.c
|
||||
index 8d553c6d56..21da783fe6 100644
|
||||
--- a/dlls/dwrite/analyzer.c
|
||||
+++ b/dlls/dwrite/analyzer.c
|
||||
@@ -2078,6 +2078,7 @@ static HRESULT fallback_get_fallback_font(struct dwrite_fontfallback *fallback,
|
||||
IDWriteFont **mapped_font)
|
||||
{
|
||||
const struct fallback_mapping *mapping;
|
||||
+ IDWriteFontCollection *collection;
|
||||
HRESULT hr;
|
||||
UINT32 i;
|
||||
|
||||
@@ -2089,9 +2090,15 @@ static HRESULT fallback_get_fallback_font(struct dwrite_fontfallback *fallback,
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
+ if (mapping->collection) {
|
||||
+ collection = mapping->collection;
|
||||
+ } else {
|
||||
+ collection = (IDWriteFontCollection *)fallback->systemcollection;
|
||||
+ }
|
||||
+
|
||||
/* Now let's see what fallback can handle. Pick first font that could be created. */
|
||||
for (i = 0; i < mapping->families_count; i++) {
|
||||
- hr = create_matching_font((IDWriteFontCollection *)fallback->systemcollection, mapping->families[i],
|
||||
+ hr = create_matching_font(collection, mapping->families[i],
|
||||
weight, style, stretch, mapped_font);
|
||||
if (hr == S_OK) {
|
||||
TRACE("Created fallback font using family %s.\n", debugstr_w(mapping->families[i]));
|
||||
@@ -2148,32 +2155,66 @@ static HRESULT WINAPI fontfallback_MapCharacters(IDWriteFontFallback *iface, IDW
|
||||
|
||||
if (basefamily && *basefamily) {
|
||||
hr = create_matching_font(basecollection, basefamily, weight, style, stretch, ret_font);
|
||||
- if (FAILED(hr))
|
||||
- goto done;
|
||||
-
|
||||
- hr = fallback_map_characters(*ret_font, text, length, mapped_length);
|
||||
- if (FAILED(hr))
|
||||
- goto done;
|
||||
+ if (SUCCEEDED(hr)) {
|
||||
+ hr = fallback_map_characters(*ret_font, text, length, mapped_length);
|
||||
+ if (FAILED(hr)) {
|
||||
+ IDWriteFont_Release(*ret_font);
|
||||
+ *ret_font = NULL;
|
||||
+ WARN("Mapping with requested family %s failed, hr %#x.\n", debugstr_w(basefamily), hr);
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
if (!*mapped_length) {
|
||||
- IDWriteFont *mapped_font;
|
||||
+ if (*ret_font) {
|
||||
+ IDWriteFont_Release(*ret_font);
|
||||
+ *ret_font = NULL;
|
||||
+ }
|
||||
|
||||
- hr = fallback_get_fallback_font(fallback, text, length, weight, style, stretch, mapped_length, &mapped_font);
|
||||
+ hr = fallback_get_fallback_font(fallback, text, length, weight, style, stretch, mapped_length, ret_font);
|
||||
if (FAILED(hr)) {
|
||||
- /* fallback wasn't found, keep base font if any, so we can get at least some visual output */
|
||||
- if (*ret_font) {
|
||||
- *mapped_length = length;
|
||||
- hr = S_OK;
|
||||
- }
|
||||
+ WARN("Mapping with fallback families failed, hr %#x.\n", hr);
|
||||
}
|
||||
- else {
|
||||
- if (*ret_font)
|
||||
- IDWriteFont_Release(*ret_font);
|
||||
- *ret_font = mapped_font;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * This is a rough hack. We search the system font collection because
|
||||
+ * the system fontfallback, which would have been searched above, is not
|
||||
+ * fully implemented as it isn't populated with any system fonts. Once
|
||||
+ * implemented, the block below can be removed.
|
||||
+ * */
|
||||
+ if (!*mapped_length) {
|
||||
+ IDWriteFontFamily *family;
|
||||
+ IDWriteFont *font;
|
||||
+ UINT32 i, count = IDWriteFontCollection_GetFontFamilyCount((IDWriteFontCollection *)fallback->systemcollection);
|
||||
+ for (i = 0; i < count; i++) {
|
||||
+ hr = IDWriteFontCollection_GetFontFamily((IDWriteFontCollection *)fallback->systemcollection, i, &family);
|
||||
+ if (FAILED(hr)) {
|
||||
+ ERR("Failed to get font family.\n");
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ hr = IDWriteFontFamily_GetFirstMatchingFont(family, weight, stretch, style, &font);
|
||||
+ IDWriteFontFamily_Release(family);
|
||||
+ if (FAILED(hr)) {
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ hr = fallback_map_characters(font, text, length, mapped_length);
|
||||
+ if (SUCCEEDED(hr) && mapped_length > 0) {
|
||||
+ *ret_font = font;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ IDWriteFont_Release(font);
|
||||
}
|
||||
}
|
||||
|
||||
+ if (!*mapped_length) {
|
||||
+ *mapped_length = length == 0 ? 0 : 1;
|
||||
+ hr = S_OK;
|
||||
+ }
|
||||
+
|
||||
done:
|
||||
heap_free(buff);
|
||||
return hr;
|
||||
diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c
|
||||
index 65e0a57678..df3f3beabb 100644
|
||||
--- a/dlls/dwrite/layout.c
|
||||
+++ b/dlls/dwrite/layout.c
|
||||
@@ -878,6 +878,12 @@ static HRESULT layout_resolve_fonts(struct dwrite_textlayout *layout)
|
||||
goto fatal;
|
||||
}
|
||||
|
||||
+ if (!font) {
|
||||
+ hr = E_FAIL;
|
||||
+ WARN("Failed to create font face, hr %#x.\n", hr);
|
||||
+ goto fatal;
|
||||
+ }
|
||||
+
|
||||
hr = IDWriteFont_CreateFontFace(font, &run->run.fontFace);
|
||||
IDWriteFont_Release(font);
|
||||
if (FAILED(hr)) {
|
||||
diff --git a/dlls/dwrite/tests/layout.c b/dlls/dwrite/tests/layout.c
|
||||
index c8f3f5a00f..430bb1f0eb 100644
|
||||
--- a/dlls/dwrite/tests/layout.c
|
||||
+++ b/dlls/dwrite/tests/layout.c
|
||||
@@ -3310,35 +3310,23 @@ todo_wine
|
||||
|
||||
count = 0;
|
||||
hr = IDWriteTextLayout_GetClusterMetrics(layout, clusters, 4, &count);
|
||||
-todo_wine
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
-todo_wine
|
||||
ok(count == 4, "got %u\n", count);
|
||||
for (i = 0, width = 0.0; i < count; i++)
|
||||
width += clusters[i].width;
|
||||
|
||||
memset(&metrics, 0xcc, sizeof(metrics));
|
||||
hr = IDWriteTextLayout_GetMetrics(layout, &metrics);
|
||||
-todo_wine
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
-todo_wine
|
||||
ok(metrics.left == 0.0, "got %.2f\n", metrics.left);
|
||||
-todo_wine
|
||||
ok(metrics.top == 0.0, "got %.2f\n", metrics.top);
|
||||
-todo_wine
|
||||
ok(metrics.width == width, "got %.2f, expected %.2f\n", metrics.width, width);
|
||||
-todo_wine
|
||||
ok(metrics.widthIncludingTrailingWhitespace == width, "got %.2f, expected %.2f\n",
|
||||
metrics.widthIncludingTrailingWhitespace, width);
|
||||
-todo_wine
|
||||
ok(metrics.height > 0.0, "got %.2f\n", metrics.height);
|
||||
-todo_wine
|
||||
ok(metrics.layoutWidth == 500.0, "got %.2f\n", metrics.layoutWidth);
|
||||
-todo_wine
|
||||
ok(metrics.layoutHeight == 1000.0, "got %.2f\n", metrics.layoutHeight);
|
||||
-todo_wine
|
||||
ok(metrics.maxBidiReorderingDepth == 1, "got %u\n", metrics.maxBidiReorderingDepth);
|
||||
-todo_wine
|
||||
ok(metrics.lineCount == 1, "got %u\n", metrics.lineCount);
|
||||
|
||||
IDWriteTextLayout_Release(layout);
|
||||
@@ -4637,16 +4625,13 @@ static void test_MapCharacters(void)
|
||||
font = NULL;
|
||||
hr = IDWriteFontFallback_MapCharacters(fallback, &analysissource, 0, 1, NULL, NULL, DWRITE_FONT_WEIGHT_NORMAL,
|
||||
DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, &mappedlength, &font, &scale);
|
||||
-todo_wine {
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(mappedlength == 1, "got %u\n", mappedlength);
|
||||
-}
|
||||
ok(scale == 1.0f, "got %f\n", scale);
|
||||
-todo_wine
|
||||
ok(font != NULL, "got %p\n", font);
|
||||
-if (font) {
|
||||
- IDWriteFont_Release(font);
|
||||
-}
|
||||
+ if (font) {
|
||||
+ IDWriteFont_Release(font);
|
||||
+ }
|
||||
/* same latin text, full length */
|
||||
g_source = strW;
|
||||
mappedlength = 0;
|
||||
@@ -4654,16 +4639,13 @@ if (font) {
|
||||
font = NULL;
|
||||
hr = IDWriteFontFallback_MapCharacters(fallback, &analysissource, 0, 3, NULL, NULL, DWRITE_FONT_WEIGHT_NORMAL,
|
||||
DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, &mappedlength, &font, &scale);
|
||||
-todo_wine {
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(mappedlength == 3, "got %u\n", mappedlength);
|
||||
-}
|
||||
ok(scale == 1.0f, "got %f\n", scale);
|
||||
-todo_wine
|
||||
ok(font != NULL, "got %p\n", font);
|
||||
-if (font) {
|
||||
- IDWriteFont_Release(font);
|
||||
-}
|
||||
+ if (font) {
|
||||
+ IDWriteFont_Release(font);
|
||||
+ }
|
||||
/* string 'a\x3058b' */
|
||||
g_source = str2W;
|
||||
mappedlength = 0;
|
||||
@@ -4671,38 +4653,32 @@ if (font) {
|
||||
font = NULL;
|
||||
hr = IDWriteFontFallback_MapCharacters(fallback, &analysissource, 0, 3, NULL, NULL, DWRITE_FONT_WEIGHT_NORMAL,
|
||||
DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, &mappedlength, &font, &scale);
|
||||
-todo_wine {
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(mappedlength == 1, "got %u\n", mappedlength);
|
||||
-}
|
||||
ok(scale == 1.0f, "got %f\n", scale);
|
||||
-todo_wine
|
||||
ok(font != NULL, "got %p\n", font);
|
||||
-if (font) {
|
||||
- IDWriteFont_Release(font);
|
||||
-}
|
||||
+ if (font) {
|
||||
+ IDWriteFont_Release(font);
|
||||
+ }
|
||||
g_source = str2W;
|
||||
mappedlength = 0;
|
||||
scale = 0.0f;
|
||||
font = NULL;
|
||||
hr = IDWriteFontFallback_MapCharacters(fallback, &analysissource, 1, 2, NULL, NULL, DWRITE_FONT_WEIGHT_NORMAL,
|
||||
DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, &mappedlength, &font, &scale);
|
||||
-todo_wine {
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(mappedlength == 1, "got %u\n", mappedlength);
|
||||
-}
|
||||
ok(scale == 1.0f, "got %f\n", scale);
|
||||
-todo_wine
|
||||
ok(font != NULL, "got %p\n", font);
|
||||
-if (font) {
|
||||
- /* font returned for Hiragana character, check if it supports Latin too */
|
||||
- exists = FALSE;
|
||||
- hr = IDWriteFont_HasCharacter(font, 'b', &exists);
|
||||
- ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
- ok(exists, "got %d\n", exists);
|
||||
+ if (font) {
|
||||
+ /* font returned for Hiragana character, check if it supports Latin too */
|
||||
+ exists = FALSE;
|
||||
+ hr = IDWriteFont_HasCharacter(font, 'b', &exists);
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+ ok(exists, "got %d\n", exists);
|
||||
|
||||
- IDWriteFont_Release(font);
|
||||
-}
|
||||
+ IDWriteFont_Release(font);
|
||||
+ }
|
||||
/* Try with explicit collection, Tahoma will be forced. */
|
||||
/* 1. Latin part */
|
||||
g_source = str2W;
|
||||
@@ -4725,7 +4701,10 @@ if (font) {
|
||||
IDWriteLocalizedStrings_Release(strings);
|
||||
IDWriteFont_Release(font);
|
||||
|
||||
- /* 2. Hiragana character, force Tahoma font does not support Japanese */
|
||||
+ /**
|
||||
+ * 2. Hiragana character. Tahoma is requested, but it doesn't support
|
||||
+ * Japanese. A NULL font is returned if there is no fallback for Japanese.
|
||||
+ */
|
||||
g_source = str2W;
|
||||
mappedlength = 0;
|
||||
scale = 0.0f;
|
||||
@@ -4735,17 +4714,19 @@ if (font) {
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(mappedlength == 1, "got %u\n", mappedlength);
|
||||
ok(scale == 1.0f, "got %f\n", scale);
|
||||
- ok(font != NULL, "got %p\n", font);
|
||||
|
||||
- exists = FALSE;
|
||||
- hr = IDWriteFont_GetInformationalStrings(font, DWRITE_INFORMATIONAL_STRING_WIN32_FAMILY_NAMES, &strings, &exists);
|
||||
- ok(hr == S_OK && exists, "got 0x%08x, exists %d\n", hr, exists);
|
||||
- hr = IDWriteLocalizedStrings_GetString(strings, 0, buffW, ARRAY_SIZE(buffW));
|
||||
- ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
-todo_wine
|
||||
- ok(lstrcmpW(buffW, tahomaW), "%s\n", wine_dbgstr_w(buffW));
|
||||
- IDWriteLocalizedStrings_Release(strings);
|
||||
- IDWriteFont_Release(font);
|
||||
+ if (!font) {
|
||||
+ skip("Missing system font for Japanese.\n");
|
||||
+ } else {
|
||||
+ exists = FALSE;
|
||||
+ hr = IDWriteFont_GetInformationalStrings(font, DWRITE_INFORMATIONAL_STRING_WIN32_FAMILY_NAMES, &strings, &exists);
|
||||
+ ok(hr == S_OK && exists, "got 0x%08x, exists %d\n", hr, exists);
|
||||
+ hr = IDWriteLocalizedStrings_GetString(strings, 0, buffW, ARRAY_SIZE(buffW));
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+ ok(lstrcmpW(buffW, tahomaW), "%s\n", wine_dbgstr_w(buffW));
|
||||
+ IDWriteLocalizedStrings_Release(strings);
|
||||
+ IDWriteFont_Release(font);
|
||||
+ }
|
||||
|
||||
IDWriteFontFallback_Release(fallback);
|
||||
IDWriteFactory2_Release(factory2);
|
||||
@@ -5708,34 +5689,22 @@ static void test_GetMetrics_with_custom_fontcollection(void)
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
count = 9999;
|
||||
hr = IDWriteTextLayout_GetClusterMetrics(layout, clusters, 4, &count);
|
||||
- todo_wine
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
- todo_wine
|
||||
ok(count == 4, "got %u\n", count);
|
||||
for (i = 0, width = 0.0; i < count; i++)
|
||||
width += clusters[i].width;
|
||||
memset(&metrics, 0xcc, sizeof(metrics));
|
||||
hr = IDWriteTextLayout_GetMetrics(layout, &metrics);
|
||||
- todo_wine
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
- todo_wine
|
||||
ok(metrics.left == 0.0, "got %.2f\n", metrics.left);
|
||||
- todo_wine
|
||||
ok(metrics.top == 0.0, "got %.2f\n", metrics.top);
|
||||
- todo_wine
|
||||
ok(metrics.width == width, "got %.2f, expected %.2f\n", metrics.width, width);
|
||||
- todo_wine
|
||||
ok(metrics.widthIncludingTrailingWhitespace == width, "got %.2f, expected %.2f\n",
|
||||
metrics.widthIncludingTrailingWhitespace, width);
|
||||
- todo_wine
|
||||
ok(metrics.height > 0.0, "got %.2f\n", metrics.height);
|
||||
- todo_wine
|
||||
ok(metrics.layoutWidth == 1000.0, "got %.2f\n", metrics.layoutWidth);
|
||||
- todo_wine
|
||||
ok(metrics.layoutHeight == 1000.0, "got %.2f\n", metrics.layoutHeight);
|
||||
- todo_wine
|
||||
ok(metrics.maxBidiReorderingDepth == 1, "got %u\n", metrics.maxBidiReorderingDepth);
|
||||
- todo_wine
|
||||
ok(metrics.lineCount == 1, "got %u\n", metrics.lineCount);
|
||||
IDWriteTextLayout_Release(layout);
|
||||
|
||||
--
|
||||
2.18.0
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user