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
30 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
f07181375b | ||
|
35f28c4538 | ||
|
4babcaf231 | ||
|
eba1e9b28a | ||
|
52076762ec | ||
|
e1bfd97e2b | ||
|
ca8ae3e929 | ||
|
c08046e1cc | ||
|
53dad92c83 | ||
|
82c59d7eca | ||
|
507cb29933 | ||
|
dff74f4169 | ||
|
292e3c87d9 | ||
|
fbb8eac819 | ||
|
41d6d5f39a | ||
|
ca67426420 | ||
|
3ad0475779 | ||
|
fad0c725ae | ||
|
be41345d31 | ||
|
e6f1cafdd8 | ||
|
79ed5e86aa | ||
|
3bba693408 | ||
|
be5814e428 | ||
|
ed630b8146 | ||
|
11194ea339 | ||
|
694f513d71 | ||
|
b5055c0b1b | ||
|
e07b0fa042 | ||
|
e7110e5153 | ||
|
e2fa6bd9c0 |
@@ -1,4 +1,4 @@
|
||||
From 2aeb3a9e57142c3f4ff86cb81b206bdbc146552d Mon Sep 17 00:00:00 2001
|
||||
From c8f9b712a946fac79af1290d14c1d31d0a8f0c10 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Tue, 22 Mar 2016 21:54:26 +0100
|
||||
Subject: [PATCH] d2d1: Avoid implicit cast of interface pointer.
|
||||
@@ -7,17 +7,16 @@ Subject: [PATCH] d2d1: Avoid implicit cast of interface pointer.
|
||||
dlls/d2d1/bitmap.c | 2 +-
|
||||
dlls/d2d1/brush.c | 8 ++++----
|
||||
dlls/d2d1/dc_render_target.c | 2 +-
|
||||
dlls/d2d1/device.c | 2 +-
|
||||
dlls/d2d1/geometry.c | 6 +++---
|
||||
dlls/d2d1/hwnd_render_target.c | 2 +-
|
||||
dlls/d2d1/state_block.c | 2 +-
|
||||
7 files changed, 12 insertions(+), 12 deletions(-)
|
||||
6 files changed, 11 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/dlls/d2d1/bitmap.c b/dlls/d2d1/bitmap.c
|
||||
index c0aef3c..8a4b517 100644
|
||||
index 39e81192f77..52810211701 100644
|
||||
--- a/dlls/d2d1/bitmap.c
|
||||
+++ b/dlls/d2d1/bitmap.c
|
||||
@@ -626,5 +626,5 @@ struct d2d_bitmap *unsafe_impl_from_ID2D1Bitmap(ID2D1Bitmap *iface)
|
||||
@@ -623,5 +623,5 @@ struct d2d_bitmap *unsafe_impl_from_ID2D1Bitmap(ID2D1Bitmap *iface)
|
||||
if (!iface)
|
||||
return NULL;
|
||||
assert(iface->lpVtbl == (ID2D1BitmapVtbl *)&d2d_bitmap_vtbl);
|
||||
@@ -25,10 +24,10 @@ index c0aef3c..8a4b517 100644
|
||||
+ return CONTAINING_RECORD((ID2D1Bitmap1*)iface, struct d2d_bitmap, ID2D1Bitmap1_iface);
|
||||
}
|
||||
diff --git a/dlls/d2d1/brush.c b/dlls/d2d1/brush.c
|
||||
index 9c73ae1..a748669 100644
|
||||
index 21abf1456ab..1030884c2b7 100644
|
||||
--- a/dlls/d2d1/brush.c
|
||||
+++ b/dlls/d2d1/brush.c
|
||||
@@ -256,7 +256,7 @@ static void d2d_brush_init(struct d2d_brush *brush, ID2D1Factory *factory,
|
||||
@@ -253,7 +253,7 @@ static void d2d_brush_init(struct d2d_brush *brush, ID2D1Factory *factory,
|
||||
|
||||
static inline struct d2d_brush *impl_from_ID2D1SolidColorBrush(ID2D1SolidColorBrush *iface)
|
||||
{
|
||||
@@ -37,7 +36,7 @@ index 9c73ae1..a748669 100644
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d2d_solid_color_brush_QueryInterface(ID2D1SolidColorBrush *iface,
|
||||
@@ -399,7 +399,7 @@ HRESULT d2d_solid_color_brush_create(ID2D1Factory *factory, const D2D1_COLOR_F *
|
||||
@@ -396,7 +396,7 @@ HRESULT d2d_solid_color_brush_create(ID2D1Factory *factory, const D2D1_COLOR_F *
|
||||
|
||||
static inline struct d2d_brush *impl_from_ID2D1LinearGradientBrush(ID2D1LinearGradientBrush *iface)
|
||||
{
|
||||
@@ -46,7 +45,7 @@ index 9c73ae1..a748669 100644
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d2d_linear_gradient_brush_QueryInterface(ID2D1LinearGradientBrush *iface,
|
||||
@@ -586,7 +586,7 @@ HRESULT d2d_linear_gradient_brush_create(ID2D1Factory *factory,
|
||||
@@ -583,7 +583,7 @@ HRESULT d2d_linear_gradient_brush_create(ID2D1Factory *factory,
|
||||
|
||||
static inline struct d2d_brush *impl_from_ID2D1RadialGradientBrush(ID2D1RadialGradientBrush *iface)
|
||||
{
|
||||
@@ -55,7 +54,7 @@ index 9c73ae1..a748669 100644
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d2d_radial_gradient_brush_QueryInterface(ID2D1RadialGradientBrush *iface,
|
||||
@@ -818,7 +818,7 @@ HRESULT d2d_radial_gradient_brush_create(ID2D1Factory *factory,
|
||||
@@ -815,7 +815,7 @@ HRESULT d2d_radial_gradient_brush_create(ID2D1Factory *factory,
|
||||
|
||||
static inline struct d2d_brush *impl_from_ID2D1BitmapBrush1(ID2D1BitmapBrush1 *iface)
|
||||
{
|
||||
@@ -65,10 +64,10 @@ index 9c73ae1..a748669 100644
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d2d_bitmap_brush_QueryInterface(ID2D1BitmapBrush1 *iface,
|
||||
diff --git a/dlls/d2d1/dc_render_target.c b/dlls/d2d1/dc_render_target.c
|
||||
index b095008..6030826 100644
|
||||
index 310c5412967..9d9168dc8ee 100644
|
||||
--- a/dlls/d2d1/dc_render_target.c
|
||||
+++ b/dlls/d2d1/dc_render_target.c
|
||||
@@ -26,7 +26,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(d2d);
|
||||
@@ -23,7 +23,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(d2d);
|
||||
|
||||
static inline struct d2d_dc_render_target *impl_from_IUnknown(IUnknown *iface)
|
||||
{
|
||||
@@ -77,24 +76,11 @@ index b095008..6030826 100644
|
||||
}
|
||||
|
||||
static HRESULT d2d_dc_render_target_present(IUnknown *outer_unknown)
|
||||
diff --git a/dlls/d2d1/device.c b/dlls/d2d1/device.c
|
||||
index 45b2258..bf32c23 100644
|
||||
--- a/dlls/d2d1/device.c
|
||||
+++ b/dlls/d2d1/device.c
|
||||
@@ -207,7 +207,7 @@ static inline struct d2d_device_context *impl_from_ID2D1DeviceContext(ID2D1Devic
|
||||
|
||||
static inline struct d2d_device_context *impl_from_ID2D1RenderTarget(ID2D1RenderTarget *iface)
|
||||
{
|
||||
- return CONTAINING_RECORD(iface, struct d2d_device_context, ID2D1DeviceContext_iface);
|
||||
+ return CONTAINING_RECORD((ID2D1DeviceContext*)iface, struct d2d_device_context, ID2D1DeviceContext_iface);
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d2d_device_context_inner_QueryInterface(IUnknown *iface, REFIID iid, void **out)
|
||||
diff --git a/dlls/d2d1/geometry.c b/dlls/d2d1/geometry.c
|
||||
index 421ba2b..f8db51c 100644
|
||||
index 91ce32c28e7..da4a1f2d3ee 100644
|
||||
--- a/dlls/d2d1/geometry.c
|
||||
+++ b/dlls/d2d1/geometry.c
|
||||
@@ -2987,7 +2987,7 @@ static const struct ID2D1GeometrySinkVtbl d2d_geometry_sink_vtbl =
|
||||
@@ -2982,7 +2982,7 @@ static const struct ID2D1GeometrySinkVtbl d2d_geometry_sink_vtbl =
|
||||
|
||||
static inline struct d2d_geometry *impl_from_ID2D1PathGeometry(ID2D1PathGeometry *iface)
|
||||
{
|
||||
@@ -103,7 +89,7 @@ index 421ba2b..f8db51c 100644
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d2d_path_geometry_QueryInterface(ID2D1PathGeometry *iface, REFIID iid, void **out)
|
||||
@@ -3503,7 +3503,7 @@ void d2d_path_geometry_init(struct d2d_geometry *geometry, ID2D1Factory *factory
|
||||
@@ -3498,7 +3498,7 @@ void d2d_path_geometry_init(struct d2d_geometry *geometry, ID2D1Factory *factory
|
||||
|
||||
static inline struct d2d_geometry *impl_from_ID2D1RectangleGeometry(ID2D1RectangleGeometry *iface)
|
||||
{
|
||||
@@ -112,7 +98,7 @@ index 421ba2b..f8db51c 100644
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d2d_rectangle_geometry_QueryInterface(ID2D1RectangleGeometry *iface,
|
||||
@@ -3838,7 +3838,7 @@ fail:
|
||||
@@ -3833,7 +3833,7 @@ fail:
|
||||
|
||||
static inline struct d2d_geometry *impl_from_ID2D1TransformedGeometry(ID2D1TransformedGeometry *iface)
|
||||
{
|
||||
@@ -122,10 +108,10 @@ index 421ba2b..f8db51c 100644
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d2d_transformed_geometry_QueryInterface(ID2D1TransformedGeometry *iface,
|
||||
diff --git a/dlls/d2d1/hwnd_render_target.c b/dlls/d2d1/hwnd_render_target.c
|
||||
index d0b9695..429561e 100644
|
||||
index 625f101eaa7..f3626c42cee 100644
|
||||
--- a/dlls/d2d1/hwnd_render_target.c
|
||||
+++ b/dlls/d2d1/hwnd_render_target.c
|
||||
@@ -26,7 +26,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(d2d);
|
||||
@@ -23,7 +23,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(d2d);
|
||||
|
||||
static inline struct d2d_hwnd_render_target *impl_from_IUnknown(IUnknown *iface)
|
||||
{
|
||||
@@ -135,10 +121,10 @@ index d0b9695..429561e 100644
|
||||
|
||||
static HRESULT d2d_hwnd_render_target_present(IUnknown *outer_unknown)
|
||||
diff --git a/dlls/d2d1/state_block.c b/dlls/d2d1/state_block.c
|
||||
index b15384e..4e7e34b 100644
|
||||
index e3175146a64..b66752983e6 100644
|
||||
--- a/dlls/d2d1/state_block.c
|
||||
+++ b/dlls/d2d1/state_block.c
|
||||
@@ -190,5 +190,5 @@ struct d2d_state_block *unsafe_impl_from_ID2D1DrawingStateBlock(ID2D1DrawingStat
|
||||
@@ -187,5 +187,5 @@ struct d2d_state_block *unsafe_impl_from_ID2D1DrawingStateBlock(ID2D1DrawingStat
|
||||
if (!iface)
|
||||
return NULL;
|
||||
assert(iface->lpVtbl == (ID2D1DrawingStateBlockVtbl *)&d2d_state_block_vtbl);
|
||||
@@ -146,5 +132,5 @@ index b15384e..4e7e34b 100644
|
||||
+ return CONTAINING_RECORD((ID2D1DrawingStateBlock1*)iface, struct d2d_state_block, ID2D1DrawingStateBlock1_iface);
|
||||
}
|
||||
--
|
||||
1.9.1
|
||||
2.20.1
|
||||
|
||||
|
@@ -1,19 +1,18 @@
|
||||
From 2a1064c5f90beac2bd709ab5d1c454c90a16189b Mon Sep 17 00:00:00 2001
|
||||
From 3c1f5962482e7acf531f57f49d923d9c4e5278b1 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Fri, 4 Aug 2017 02:51:57 +0200
|
||||
Subject: advapi32: Implement CreateRestrictedToken.
|
||||
Subject: [PATCH] advapi32: Implement CreateRestrictedToken.
|
||||
|
||||
---
|
||||
dlls/advapi32/security.c | 88 +++++++++++++++++++++++++++++++++++-------
|
||||
dlls/advapi32/tests/security.c | 88 +++++++++++++++++++++++++++++++++++++++---
|
||||
2 files changed, 157 insertions(+), 19 deletions(-)
|
||||
dlls/kernelbase/security.c | 103 ++++++++++++++++++++++++++++++-------
|
||||
1 file changed, 84 insertions(+), 19 deletions(-)
|
||||
|
||||
diff --git a/dlls/advapi32/security.c b/dlls/advapi32/security.c
|
||||
index 82bb6689d43..c531e45c9a0 100644
|
||||
--- a/dlls/advapi32/security.c
|
||||
+++ b/dlls/advapi32/security.c
|
||||
@@ -840,6 +840,60 @@ BOOL WINAPI SetThreadToken(PHANDLE thread, HANDLE token)
|
||||
ThreadImpersonationToken, &token, sizeof token ));
|
||||
diff --git a/dlls/kernelbase/security.c b/dlls/kernelbase/security.c
|
||||
index 2e75e81ed77..97f6ee6a2fd 100644
|
||||
--- a/dlls/kernelbase/security.c
|
||||
+++ b/dlls/kernelbase/security.c
|
||||
@@ -592,31 +592,96 @@ exit:
|
||||
return ret;
|
||||
}
|
||||
|
||||
+static BOOL allocate_groups(TOKEN_GROUPS **groups_ret, SID_AND_ATTRIBUTES *sids, DWORD count)
|
||||
@@ -71,11 +70,16 @@ index 82bb6689d43..c531e45c9a0 100644
|
||||
+}
|
||||
+
|
||||
/*************************************************************************
|
||||
* CreateRestrictedToken [ADVAPI32.@]
|
||||
*
|
||||
@@ -871,25 +925,33 @@ BOOL WINAPI CreateRestrictedToken(
|
||||
PSID_AND_ATTRIBUTES restrictSids,
|
||||
PHANDLE newToken)
|
||||
* CreateRestrictedToken (kernelbase.@)
|
||||
*/
|
||||
-BOOL WINAPI CreateRestrictedToken( HANDLE token, DWORD flags,
|
||||
- DWORD disable_count, PSID_AND_ATTRIBUTES disable_sids,
|
||||
- DWORD delete_count, PLUID_AND_ATTRIBUTES delete_privs,
|
||||
- DWORD restrict_count, PSID_AND_ATTRIBUTES restrict_sids, PHANDLE ret )
|
||||
+BOOL WINAPI CreateRestrictedToken( HANDLE baseToken, DWORD flags,
|
||||
+ DWORD nDisableSids, PSID_AND_ATTRIBUTES disableSids,
|
||||
+ DWORD nDeletePrivs, PLUID_AND_ATTRIBUTES deletePrivs,
|
||||
+ DWORD nRestrictSids, PSID_AND_ATTRIBUTES restrictSids, PHANDLE newToken )
|
||||
{
|
||||
- TOKEN_TYPE type;
|
||||
- SECURITY_IMPERSONATION_LEVEL level = SecurityAnonymous;
|
||||
@@ -86,21 +90,14 @@ index 82bb6689d43..c531e45c9a0 100644
|
||||
+ BOOL ret = FALSE;
|
||||
|
||||
- FIXME("(%p, 0x%x, %u, %p, %u, %p, %u, %p, %p): stub\n",
|
||||
- token, flags, disable_count, disable_sids, delete_count, delete_privs,
|
||||
- restrict_count, restrict_sids, ret );
|
||||
+ TRACE("(%p, 0x%x, %u, %p, %u, %p, %u, %p, %p)\n",
|
||||
baseToken, flags, nDisableSids, disableSids,
|
||||
nDeletePrivs, deletePrivs,
|
||||
nRestrictSids, restrictSids,
|
||||
newToken);
|
||||
|
||||
- size = sizeof(type);
|
||||
- if (!GetTokenInformation( baseToken, TokenType, &type, size, &size )) return FALSE;
|
||||
- if (type == TokenImpersonation)
|
||||
- {
|
||||
- size = sizeof(level);
|
||||
- if (!GetTokenInformation( baseToken, TokenImpersonationLevel, &level, size, &size ))
|
||||
- return FALSE;
|
||||
- }
|
||||
- return DuplicateTokenEx( baseToken, MAXIMUM_ALLOWED, NULL, level, type, newToken );
|
||||
+ baseToken, flags, nDisableSids, disableSids,
|
||||
+ nDeletePrivs, deletePrivs,
|
||||
+ nRestrictSids, restrictSids,
|
||||
+ newToken);
|
||||
+
|
||||
+ if (!allocate_groups(&disable_groups, disableSids, nDisableSids))
|
||||
+ goto done;
|
||||
+
|
||||
@@ -117,155 +114,19 @@ index 82bb6689d43..c531e45c9a0 100644
|
||||
+ heap_free(delete_privs);
|
||||
+ heap_free(restrict_sids);
|
||||
+ return ret;
|
||||
|
||||
- size = sizeof(type);
|
||||
- if (!GetTokenInformation( token, TokenType, &type, size, &size )) return FALSE;
|
||||
- if (type == TokenImpersonation)
|
||||
- {
|
||||
- size = sizeof(level);
|
||||
- if (!GetTokenInformation( token, TokenImpersonationLevel, &level, size, &size ))
|
||||
- return FALSE;
|
||||
- }
|
||||
- return DuplicateTokenEx( token, MAXIMUM_ALLOWED, NULL, level, type, ret );
|
||||
}
|
||||
|
||||
/* ##############################
|
||||
diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c
|
||||
index a1ecc409b73..0fd41fe82fa 100644
|
||||
--- a/dlls/advapi32/tests/security.c
|
||||
+++ b/dlls/advapi32/tests/security.c
|
||||
@@ -5292,10 +5292,13 @@ static void test_GetUserNameW(void)
|
||||
|
||||
static void test_CreateRestrictedToken(void)
|
||||
{
|
||||
+ TOKEN_PRIMARY_GROUP *primary_group, *primary_group2;
|
||||
HANDLE process_token, token, r_token;
|
||||
PTOKEN_GROUPS token_groups, groups2;
|
||||
SID_AND_ATTRIBUTES sattr;
|
||||
SECURITY_IMPERSONATION_LEVEL level;
|
||||
+ TOKEN_PRIVILEGES *privs;
|
||||
+ PRIVILEGE_SET privset;
|
||||
TOKEN_TYPE type;
|
||||
BOOL is_member;
|
||||
DWORD size;
|
||||
@@ -5311,7 +5314,7 @@ static void test_CreateRestrictedToken(void)
|
||||
ret = OpenProcessToken(GetCurrentProcess(), TOKEN_DUPLICATE|TOKEN_QUERY, &process_token);
|
||||
ok(ret, "got error %d\n", GetLastError());
|
||||
|
||||
- ret = DuplicateTokenEx(process_token, TOKEN_DUPLICATE|TOKEN_ADJUST_GROUPS|TOKEN_QUERY,
|
||||
+ ret = DuplicateTokenEx(process_token, TOKEN_DUPLICATE|TOKEN_ADJUST_GROUPS|TOKEN_ADJUST_PRIVILEGES|TOKEN_QUERY,
|
||||
NULL, SecurityImpersonation, TokenImpersonation, &token);
|
||||
ok(ret, "got error %d\n", GetLastError());
|
||||
|
||||
@@ -5342,11 +5345,21 @@ static void test_CreateRestrictedToken(void)
|
||||
ok(ret, "got error %d\n", GetLastError());
|
||||
ok(is_member, "not a member\n");
|
||||
|
||||
- /* disable a SID in new token */
|
||||
+ privset.PrivilegeCount = 1;
|
||||
+ privset.Control = PRIVILEGE_SET_ALL_NECESSARY;
|
||||
+ ret = LookupPrivilegeValueA(NULL, "SeChangeNotifyPrivilege", &privset.Privilege[0].Luid);
|
||||
+ ok(ret, "got error %d\n", GetLastError());
|
||||
+
|
||||
+ is_member = FALSE;
|
||||
+ ret = PrivilegeCheck(token, &privset, &is_member);
|
||||
+ ok(ret, "got error %d\n", GetLastError());
|
||||
+ ok(is_member, "Expected SeChangeNotifyPrivilege to be enabled\n");
|
||||
+
|
||||
+ /* disable a SID and a privilege in new token */
|
||||
sattr.Sid = token_groups->Groups[i].Sid;
|
||||
sattr.Attributes = 0;
|
||||
r_token = NULL;
|
||||
- ret = pCreateRestrictedToken(token, 0, 1, &sattr, 0, NULL, 0, NULL, &r_token);
|
||||
+ ret = pCreateRestrictedToken(token, 0, 1, &sattr, 1, &privset.Privilege[0], 0, NULL, &r_token);
|
||||
ok(ret, "got error %d\n", GetLastError());
|
||||
|
||||
if (ret)
|
||||
@@ -5355,7 +5368,7 @@ static void test_CreateRestrictedToken(void)
|
||||
is_member = TRUE;
|
||||
ret = pCheckTokenMembership(r_token, token_groups->Groups[i].Sid, &is_member);
|
||||
ok(ret, "got error %d\n", GetLastError());
|
||||
- todo_wine ok(!is_member, "not a member\n");
|
||||
+ ok(!is_member, "not a member\n");
|
||||
|
||||
ret = GetTokenInformation(r_token, TokenGroups, NULL, 0, &size);
|
||||
ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, "got %d with error %d\n",
|
||||
@@ -5370,9 +5383,9 @@ static void test_CreateRestrictedToken(void)
|
||||
break;
|
||||
}
|
||||
|
||||
- todo_wine ok(groups2->Groups[j].Attributes & SE_GROUP_USE_FOR_DENY_ONLY,
|
||||
+ ok(groups2->Groups[j].Attributes & SE_GROUP_USE_FOR_DENY_ONLY,
|
||||
"got wrong attributes\n");
|
||||
- todo_wine ok((groups2->Groups[j].Attributes & SE_GROUP_ENABLED) == 0,
|
||||
+ ok((groups2->Groups[j].Attributes & SE_GROUP_ENABLED) == 0,
|
||||
"got wrong attributes\n");
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, groups2);
|
||||
@@ -5386,10 +5399,73 @@ static void test_CreateRestrictedToken(void)
|
||||
ret = GetTokenInformation(r_token, TokenImpersonationLevel, &level, size, &size);
|
||||
ok(ret, "got error %d\n", GetLastError());
|
||||
ok(level == SecurityImpersonation, "got level %u\n", type);
|
||||
+
|
||||
+ is_member = TRUE;
|
||||
+ ret = PrivilegeCheck(r_token, &privset, &is_member);
|
||||
+ ok(ret, "got error %d\n", GetLastError());
|
||||
+ ok(!is_member, "Expected SeChangeNotifyPrivilege not to be enabled\n");
|
||||
+
|
||||
+ ret = GetTokenInformation(r_token, TokenPrivileges, NULL, 0, &size);
|
||||
+ ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, "got %d with error %d\n",
|
||||
+ ret, GetLastError());
|
||||
+ privs = HeapAlloc(GetProcessHeap(), 0, size);
|
||||
+ ret = GetTokenInformation(r_token, TokenPrivileges, privs, size, &size);
|
||||
+ ok(ret, "got error %d\n", GetLastError());
|
||||
+
|
||||
+ is_member = FALSE;
|
||||
+ for (j = 0; j < privs->PrivilegeCount; j++)
|
||||
+ {
|
||||
+ if (RtlEqualLuid(&privs->Privileges[j].Luid, &privset.Privilege[0].Luid))
|
||||
+ {
|
||||
+ is_member = TRUE;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ ok(!is_member, "Expected not to find privilege\n");
|
||||
+ HeapFree(GetProcessHeap(), 0, privs);
|
||||
}
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, token_groups);
|
||||
CloseHandle(r_token);
|
||||
+
|
||||
+ ret = GetTokenInformation(token, TokenPrimaryGroup, NULL, 0, &size);
|
||||
+ ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, "got %d with error %d\n",
|
||||
+ ret, GetLastError());
|
||||
+ primary_group = HeapAlloc(GetProcessHeap(), 0, size);
|
||||
+ ret = GetTokenInformation(token, TokenPrimaryGroup, primary_group, size, &size);
|
||||
+ ok(ret, "got error %d\n", GetLastError());
|
||||
+
|
||||
+ /* disable primary group */
|
||||
+ sattr.Sid = primary_group->PrimaryGroup;
|
||||
+ sattr.Attributes = 0;
|
||||
+ r_token = NULL;
|
||||
+ ret = pCreateRestrictedToken(token, 0, 1, &sattr, 0, NULL, 0, NULL, &r_token);
|
||||
+ ok(ret, "got error %d\n", GetLastError());
|
||||
+
|
||||
+ if (ret)
|
||||
+ {
|
||||
+ is_member = TRUE;
|
||||
+ ret = pCheckTokenMembership(r_token, primary_group->PrimaryGroup, &is_member);
|
||||
+ ok(ret, "got error %d\n", GetLastError());
|
||||
+ ok(!is_member, "not a member\n");
|
||||
+
|
||||
+ ret = GetTokenInformation(r_token, TokenPrimaryGroup, NULL, 0, &size);
|
||||
+ ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, "got %d with error %d\n",
|
||||
+ ret, GetLastError());
|
||||
+ primary_group2 = HeapAlloc(GetProcessHeap(), 0, size);
|
||||
+ ret = GetTokenInformation(r_token, TokenPrimaryGroup, primary_group2, size, &size);
|
||||
+ ok(ret, "got error %d\n", GetLastError());
|
||||
+
|
||||
+ ok(EqualSid(primary_group2->PrimaryGroup, primary_group->PrimaryGroup),
|
||||
+ "Expected same primary group\n");
|
||||
+
|
||||
+ HeapFree(GetProcessHeap(), 0, primary_group2);
|
||||
+ }
|
||||
+
|
||||
+ HeapFree(GetProcessHeap(), 0, primary_group);
|
||||
+ CloseHandle(r_token);
|
||||
+
|
||||
CloseHandle(token);
|
||||
CloseHandle(process_token);
|
||||
}
|
||||
/******************************************************************************
|
||||
--
|
||||
2.13.1
|
||||
2.20.1
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From e571cdf9236e083f196c09d0fc96ed7c98fae440 Mon Sep 17 00:00:00 2001
|
||||
From 9f35230848f29e79b65c8e340221d7eb81382a43 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, 66 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c
|
||||
index bb6cc3e..7b202db 100644
|
||||
index 802d99f2a12..03c0588d59a 100644
|
||||
--- a/dlls/kernel32/process.c
|
||||
+++ b/dlls/kernel32/process.c
|
||||
@@ -2289,7 +2289,7 @@ static BOOL replace_process( HANDLE handle, const RTL_USER_PROCESS_PARAMETERS *p
|
||||
@@ -2341,7 +2341,7 @@ static BOOL replace_process( HANDLE handle, const RTL_USER_PROCESS_PARAMETERS *p
|
||||
* 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 bb6cc3e..7b202db 100644
|
||||
BOOL inherit, DWORD flags, const RTL_USER_PROCESS_PARAMETERS *params,
|
||||
LPPROCESS_INFORMATION info, LPCSTR unixdir, const pe_image_info_t *pe_info )
|
||||
{
|
||||
@@ -2356,6 +2356,7 @@ static BOOL create_process( HANDLE hFile, LPSECURITY_ATTRIBUTES psa, LPSECURITY_
|
||||
@@ -2408,6 +2408,7 @@ static BOOL create_process( HANDLE hFile, LPSECURITY_ATTRIBUTES psa, LPSECURITY_
|
||||
req->access = PROCESS_ALL_ACCESS;
|
||||
req->cpu = pe_info->cpu;
|
||||
req->info_size = startup_info_size;
|
||||
@@ -35,7 +35,7 @@ index bb6cc3e..7b202db 100644
|
||||
wine_server_add_data( req, objattr, attr_len );
|
||||
wine_server_add_data( req, startup_info, startup_info_size );
|
||||
wine_server_add_data( req, params->Environment, (env_end - params->Environment) * sizeof(WCHAR) );
|
||||
@@ -2526,7 +2527,7 @@ static RTL_USER_PROCESS_PARAMETERS *get_vdm_params( const RTL_USER_PROCESS_PARAM
|
||||
@@ -2567,7 +2568,7 @@ static RTL_USER_PROCESS_PARAMETERS *get_vdm_params( const RTL_USER_PROCESS_PARAM
|
||||
*
|
||||
* Create a new VDM process for a 16-bit or DOS application.
|
||||
*/
|
||||
@@ -44,7 +44,7 @@ index bb6cc3e..7b202db 100644
|
||||
BOOL inherit, DWORD flags, const RTL_USER_PROCESS_PARAMETERS *params,
|
||||
LPPROCESS_INFORMATION info, LPCSTR unixdir )
|
||||
{
|
||||
@@ -2536,7 +2537,7 @@ static BOOL create_vdm_process( LPSECURITY_ATTRIBUTES psa, LPSECURITY_ATTRIBUTES
|
||||
@@ -2577,7 +2578,7 @@ static BOOL create_vdm_process( LPSECURITY_ATTRIBUTES psa, LPSECURITY_ATTRIBUTES
|
||||
|
||||
if (!(new_params = get_vdm_params( params, &pe_info ))) return FALSE;
|
||||
|
||||
@@ -53,7 +53,7 @@ index bb6cc3e..7b202db 100644
|
||||
RtlDestroyProcessParameters( new_params );
|
||||
return ret;
|
||||
}
|
||||
@@ -2547,7 +2548,7 @@ static BOOL create_vdm_process( LPSECURITY_ATTRIBUTES psa, LPSECURITY_ATTRIBUTES
|
||||
@@ -2588,7 +2589,7 @@ static BOOL create_vdm_process( LPSECURITY_ATTRIBUTES psa, LPSECURITY_ATTRIBUTES
|
||||
*
|
||||
* Create a new cmd shell process for a .BAT file.
|
||||
*/
|
||||
@@ -62,7 +62,7 @@ index bb6cc3e..7b202db 100644
|
||||
BOOL inherit, DWORD flags, LPSTARTUPINFOW startup,
|
||||
const RTL_USER_PROCESS_PARAMETERS *params,
|
||||
LPPROCESS_INFORMATION info )
|
||||
@@ -2577,9 +2578,9 @@ static BOOL create_cmd_process( LPSECURITY_ATTRIBUTES psa, LPSECURITY_ATTRIBUTES
|
||||
@@ -2618,9 +2619,9 @@ static BOOL create_cmd_process( LPSECURITY_ATTRIBUTES psa, LPSECURITY_ATTRIBUTES
|
||||
strcatW( newcmdline, params->CommandLine.Buffer );
|
||||
strcatW( newcmdline, quotW );
|
||||
if (params->CurrentDirectory.DosPath.Length) cur_dir = params->CurrentDirectory.DosPath.Buffer;
|
||||
@@ -74,7 +74,7 @@ index bb6cc3e..7b202db 100644
|
||||
HeapFree( GetProcessHeap(), 0, newcmdline );
|
||||
return ret;
|
||||
}
|
||||
@@ -2692,7 +2693,9 @@ BOOL WINAPI CreateProcessInternalW( HANDLE token, LPCWSTR app_name, LPWSTR cmd_l
|
||||
@@ -2734,7 +2735,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) );
|
||||
|
||||
@@ -85,7 +85,7 @@ index bb6cc3e..7b202db 100644
|
||||
if (new_token) FIXME("No support for returning created process token\n");
|
||||
|
||||
if (!(tidy_cmdline = get_file_name( app_name, cmd_line, name, ARRAY_SIZE( name ), &hFile, &is_64bit )))
|
||||
@@ -2760,17 +2763,17 @@ BOOL WINAPI CreateProcessInternalW( HANDLE token, LPCWSTR app_name, LPWSTR cmd_l
|
||||
@@ -2802,17 +2805,17 @@ BOOL WINAPI CreateProcessInternalW( HANDLE token, LPCWSTR app_name, LPWSTR cmd_l
|
||||
debugstr_w(name), is_64bit_arch(pe_info.cpu) ? 64 : 32,
|
||||
wine_dbgstr_longlong(pe_info.base), wine_dbgstr_longlong(pe_info.base + pe_info.map_size),
|
||||
cpu_names[pe_info.cpu] );
|
||||
@@ -106,7 +106,7 @@ index bb6cc3e..7b202db 100644
|
||||
inherit, flags, params, info, unixdir, &pe_info );
|
||||
break;
|
||||
case BINARY_UNKNOWN:
|
||||
@@ -2780,14 +2783,14 @@ BOOL WINAPI CreateProcessInternalW( HANDLE token, LPCWSTR app_name, LPWSTR cmd_l
|
||||
@@ -2822,14 +2825,14 @@ BOOL WINAPI CreateProcessInternalW( HANDLE token, LPCWSTR app_name, LPWSTR cmd_l
|
||||
if (!strcmpiW( p, comW ) || !strcmpiW( p, pifW ))
|
||||
{
|
||||
TRACE( "starting %s as DOS binary\n", debugstr_w(name) );
|
||||
@@ -124,10 +124,10 @@ index bb6cc3e..7b202db 100644
|
||||
break;
|
||||
}
|
||||
diff --git a/server/process.c b/server/process.c
|
||||
index af2ba3d..57bf0ec 100644
|
||||
index 30832f474da..028ffa1b454 100644
|
||||
--- a/server/process.c
|
||||
+++ b/server/process.c
|
||||
@@ -486,7 +486,7 @@ static void start_sigkill_timer( struct process *process )
|
||||
@@ -491,7 +491,7 @@ static void start_sigkill_timer( struct process *process )
|
||||
/* create a new process */
|
||||
/* if the function fails the fd is closed */
|
||||
struct process *create_process( int fd, struct process *parent, int inherit_all,
|
||||
@@ -136,7 +136,7 @@ index af2ba3d..57bf0ec 100644
|
||||
{
|
||||
struct process *process;
|
||||
|
||||
@@ -561,7 +561,7 @@ struct process *create_process( int fd, struct process *parent, int inherit_all,
|
||||
@@ -567,7 +567,7 @@ struct process *create_process( int fd, struct process *parent, int inherit_all,
|
||||
: 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 */
|
||||
@@ -145,7 +145,7 @@ index af2ba3d..57bf0ec 100644
|
||||
process->affinity = parent->affinity;
|
||||
}
|
||||
if (!process->handles || !process->token) goto error;
|
||||
@@ -1127,6 +1127,7 @@ DECL_HANDLER(new_process)
|
||||
@@ -1123,6 +1123,7 @@ DECL_HANDLER(new_process)
|
||||
const struct security_descriptor *sd;
|
||||
const struct object_attributes *objattr = get_req_object_attributes( &sd, &name, NULL );
|
||||
struct process *process = NULL;
|
||||
@@ -153,7 +153,7 @@ index af2ba3d..57bf0ec 100644
|
||||
struct process *parent = current->process;
|
||||
int socket_fd = thread_get_inflight_fd( current, req->socket_fd );
|
||||
|
||||
@@ -1167,10 +1168,39 @@ DECL_HANDLER(new_process)
|
||||
@@ -1163,10 +1164,39 @@ DECL_HANDLER(new_process)
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -193,7 +193,7 @@ index af2ba3d..57bf0ec 100644
|
||||
return;
|
||||
}
|
||||
info->process = NULL;
|
||||
@@ -1217,7 +1247,7 @@ DECL_HANDLER(new_process)
|
||||
@@ -1213,7 +1243,7 @@ DECL_HANDLER(new_process)
|
||||
#undef FIXUP_LEN
|
||||
}
|
||||
|
||||
@@ -202,7 +202,7 @@ index af2ba3d..57bf0ec 100644
|
||||
|
||||
process->startup_info = (struct startup_info *)grab_object( info );
|
||||
|
||||
@@ -1279,6 +1309,7 @@ DECL_HANDLER(new_process)
|
||||
@@ -1275,6 +1305,7 @@ DECL_HANDLER(new_process)
|
||||
reply->handle = alloc_handle_no_access_check( parent, process, req->access, objattr->attributes );
|
||||
|
||||
done:
|
||||
@@ -210,7 +210,7 @@ index af2ba3d..57bf0ec 100644
|
||||
if (process) release_object( process );
|
||||
release_object( info );
|
||||
}
|
||||
@@ -1311,7 +1342,7 @@ DECL_HANDLER(exec_process)
|
||||
@@ -1307,7 +1338,7 @@ DECL_HANDLER(exec_process)
|
||||
close( socket_fd );
|
||||
return;
|
||||
}
|
||||
@@ -220,10 +220,10 @@ index af2ba3d..57bf0ec 100644
|
||||
release_object( process );
|
||||
}
|
||||
diff --git a/server/process.h b/server/process.h
|
||||
index 029b328..ea28091 100644
|
||||
index f21ab7722a9..774c147e783 100644
|
||||
--- a/server/process.h
|
||||
+++ b/server/process.h
|
||||
@@ -116,7 +116,7 @@ extern unsigned int alloc_ptid( void *ptr );
|
||||
@@ -117,7 +117,7 @@ extern unsigned int alloc_ptid( void *ptr );
|
||||
extern void free_ptid( unsigned int id );
|
||||
extern void *get_ptid_entry( unsigned int id );
|
||||
extern struct process *create_process( int fd, struct process *parent, int inherit_all,
|
||||
@@ -233,22 +233,22 @@ index 029b328..ea28091 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 607644e..1b5e6de 100644
|
||||
index fcca1d255ba..4b01c6d1904 100644
|
||||
--- a/server/protocol.def
|
||||
+++ b/server/protocol.def
|
||||
@@ -744,6 +744,7 @@ struct rawinput_device
|
||||
@@ -790,6 +790,7 @@ struct rawinput_device
|
||||
unsigned int access; /* access rights for process object */
|
||||
cpu_type_t cpu; /* CPU that the new process will use */
|
||||
client_cpu_t cpu; /* CPU that the new process will use */
|
||||
data_size_t info_size; /* size of startup info */
|
||||
+ obj_handle_t token; /* token for the new process */
|
||||
VARARG(objattr,object_attributes); /* object attributes */
|
||||
VARARG(info,startup_info,info_size); /* startup information */
|
||||
VARARG(env,unicode_str); /* environment for new process */
|
||||
diff --git a/server/request.c b/server/request.c
|
||||
index c10c4e6..86f293f 100644
|
||||
index d2adb08a183..139d643e8c8 100644
|
||||
--- a/server/request.c
|
||||
+++ b/server/request.c
|
||||
@@ -577,7 +577,7 @@ static void master_socket_poll_event( struct fd *fd, int event )
|
||||
@@ -578,7 +578,7 @@ static void master_socket_poll_event( struct fd *fd, int event )
|
||||
int client = accept( get_unix_fd( master_socket->fd ), (struct sockaddr *) &dummy, &len );
|
||||
if (client == -1) return;
|
||||
fcntl( client, F_SETFL, O_NONBLOCK );
|
||||
@@ -258,7 +258,7 @@ index c10c4e6..86f293f 100644
|
||||
create_thread( -1, process, NULL );
|
||||
release_object( process );
|
||||
diff --git a/server/security.h b/server/security.h
|
||||
index 21e90cc..32dfe5f 100644
|
||||
index 21e90ccf23f..32dfe5f8db9 100644
|
||||
--- a/server/security.h
|
||||
+++ b/server/security.h
|
||||
@@ -67,6 +67,8 @@ extern const ACL *token_get_default_dacl( struct token *token );
|
||||
@@ -271,10 +271,10 @@ index 21e90cc..32dfe5f 100644
|
||||
static inline const ACE_HEADER *ace_next( const ACE_HEADER *ace )
|
||||
{
|
||||
diff --git a/server/token.c b/server/token.c
|
||||
index 1184241..5db97b4 100644
|
||||
index 181219d2179..858ec25d792 100644
|
||||
--- a/server/token.c
|
||||
+++ b/server/token.c
|
||||
@@ -836,6 +836,12 @@ int token_assign_label( struct token *token, PSID label )
|
||||
@@ -845,6 +845,12 @@ int token_assign_label( struct token *token, PSID label )
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -287,7 +287,7 @@ index 1184241..5db97b4 100644
|
||||
struct token *token_create_admin( void )
|
||||
{
|
||||
struct token *token = NULL;
|
||||
@@ -1262,6 +1268,11 @@ const SID *token_get_primary_group( struct token *token )
|
||||
@@ -1271,6 +1277,11 @@ const SID *token_get_primary_group( struct token *token )
|
||||
return token->primary_group;
|
||||
}
|
||||
|
||||
@@ -300,5 +300,5 @@ index 1184241..5db97b4 100644
|
||||
{
|
||||
GENERIC_MAPPING mapping;
|
||||
--
|
||||
1.9.1
|
||||
2.20.1
|
||||
|
||||
|
@@ -1,15 +1,15 @@
|
||||
From 9a67b4c62e5a575a38081114d4434f274355020e Mon Sep 17 00:00:00 2001
|
||||
From 21b4b65eadc9e39008ccadc48307fcfea05a24fb Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Tue, 12 Apr 2016 01:02:34 +0200
|
||||
Subject: [PATCH] uiautomationcore: Add dll and stub some functions.
|
||||
|
||||
---
|
||||
dlls/uiautomationcore/Makefile.in | 1 +
|
||||
dlls/uiautomationcore/uia_main.c | 53 ++++++++++++++++++++++++++++++++++-----
|
||||
dlls/uiautomationcore/uia_main.c | 53 +++++++++++++++++++++++++++----
|
||||
2 files changed, 48 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/dlls/uiautomationcore/Makefile.in b/dlls/uiautomationcore/Makefile.in
|
||||
index 5221450..5173f23 100644
|
||||
index b6edec5f6a9..bf2204d5ab4 100644
|
||||
--- a/dlls/uiautomationcore/Makefile.in
|
||||
+++ b/dlls/uiautomationcore/Makefile.in
|
||||
@@ -1,5 +1,6 @@
|
||||
@@ -17,10 +17,10 @@ index 5221450..5173f23 100644
|
||||
IMPORTLIB = uiautomationcore
|
||||
+IMPORTS = uuid
|
||||
|
||||
C_SRCS = \
|
||||
uia_main.c
|
||||
EXTRADLLFLAGS = -mno-cygwin
|
||||
|
||||
diff --git a/dlls/uiautomationcore/uia_main.c b/dlls/uiautomationcore/uia_main.c
|
||||
index f0d8247..b9c24b4 100644
|
||||
index f0d8247724d..b9c24b4b963 100644
|
||||
--- a/dlls/uiautomationcore/uia_main.c
|
||||
+++ b/dlls/uiautomationcore/uia_main.c
|
||||
@@ -1,4 +1,5 @@
|
||||
@@ -122,5 +122,5 @@ index f0d8247..b9c24b4 100644
|
||||
}
|
||||
|
||||
--
|
||||
1.9.1
|
||||
2.17.1
|
||||
|
||||
|
@@ -1,22 +1,22 @@
|
||||
From 07c70b0b20919d9908b408322d65c62ad459f09e Mon Sep 17 00:00:00 2001
|
||||
From 4984f8e6033facccfa7b27b4b0f83e6615abc972 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Thu, 19 Jan 2017 16:56:56 +0100
|
||||
Subject: [PATCH] d3d11: Initial implementation for deferred contexts.
|
||||
|
||||
---
|
||||
dlls/d3d11/device.c | 1071 +++++++++++++++++++++++++++++++++++++++++++++++++--
|
||||
1 file changed, 1040 insertions(+), 31 deletions(-)
|
||||
dlls/d3d11/device.c | 1072 +++++++++++++++++++++++++++++++++++++++++--
|
||||
1 file changed, 1041 insertions(+), 31 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
|
||||
index ebe8c03..791b959 100644
|
||||
index fbc875c6fee..74ae6f8f333 100644
|
||||
--- a/dlls/d3d11/device.c
|
||||
+++ b/dlls/d3d11/device.c
|
||||
@@ -19,12 +19,181 @@
|
||||
@@ -17,11 +17,181 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
+#include "wine/list.h"
|
||||
|
||||
+
|
||||
#define NONAMELESSUNION
|
||||
#include "d3d11_private.h"
|
||||
|
||||
@@ -193,7 +193,7 @@ index ebe8c03..791b959 100644
|
||||
/* ID3D11DeviceContext - deferred context */
|
||||
struct d3d11_deferred_context
|
||||
{
|
||||
@@ -32,9 +201,531 @@ struct d3d11_deferred_context
|
||||
@@ -29,9 +199,531 @@ struct d3d11_deferred_context
|
||||
ID3D11Device *device;
|
||||
LONG refcount;
|
||||
|
||||
@@ -725,7 +725,7 @@ index ebe8c03..791b959 100644
|
||||
static void STDMETHODCALLTYPE d3d_null_wined3d_object_destroyed(void *parent) {}
|
||||
|
||||
static const struct wined3d_parent_ops d3d_null_wined3d_parent_ops =
|
||||
@@ -1221,7 +1912,20 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_ResolveSubresource(ID3D11D
|
||||
@@ -1226,7 +1918,20 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_ResolveSubresource(ID3D11D
|
||||
static void STDMETHODCALLTYPE d3d11_immediate_context_ExecuteCommandList(ID3D11DeviceContext1 *iface,
|
||||
ID3D11CommandList *command_list, BOOL restore_state)
|
||||
{
|
||||
@@ -747,7 +747,7 @@ index ebe8c03..791b959 100644
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_immediate_context_HSSetShaderResources(ID3D11DeviceContext1 *iface,
|
||||
@@ -2855,6 +3559,7 @@ static ULONG STDMETHODCALLTYPE d3d11_deferred_context_Release(ID3D11DeviceContex
|
||||
@@ -2938,6 +3643,7 @@ static ULONG STDMETHODCALLTYPE d3d11_deferred_context_Release(ID3D11DeviceContex
|
||||
|
||||
if (!refcount)
|
||||
{
|
||||
@@ -755,7 +755,7 @@ index ebe8c03..791b959 100644
|
||||
wined3d_private_store_cleanup(&context->private_store);
|
||||
ID3D11Device_Release(context->device);
|
||||
HeapFree(GetProcessHeap(), 0, context);
|
||||
@@ -2906,43 +3611,86 @@ static HRESULT STDMETHODCALLTYPE d3d11_deferred_context_SetPrivateDataInterface(
|
||||
@@ -2989,43 +3695,86 @@ static HRESULT STDMETHODCALLTYPE d3d11_deferred_context_SetPrivateDataInterface(
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_VSSetConstantBuffers(ID3D11DeviceContext *iface,
|
||||
UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers)
|
||||
{
|
||||
@@ -848,7 +848,7 @@ index ebe8c03..791b959 100644
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_Draw(ID3D11DeviceContext *iface,
|
||||
@@ -2955,53 +3703,169 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_Draw(ID3D11DeviceContext *i
|
||||
@@ -3038,53 +3787,169 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_Draw(ID3D11DeviceContext *i
|
||||
static HRESULT STDMETHODCALLTYPE d3d11_deferred_context_Map(ID3D11DeviceContext *iface, ID3D11Resource *resource,
|
||||
UINT subresource_idx, D3D11_MAP map_type, UINT map_flags, D3D11_MAPPED_SUBRESOURCE *mapped_subresource)
|
||||
{
|
||||
@@ -1027,7 +1027,7 @@ index ebe8c03..791b959 100644
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_DrawInstanced(ID3D11DeviceContext *iface,
|
||||
@@ -3030,7 +3894,16 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_GSSetShader(ID3D11DeviceCon
|
||||
@@ -3113,7 +3978,16 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_GSSetShader(ID3D11DeviceCon
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_IASetPrimitiveTopology(ID3D11DeviceContext *iface,
|
||||
D3D11_PRIMITIVE_TOPOLOGY topology)
|
||||
{
|
||||
@@ -1045,7 +1045,7 @@ index ebe8c03..791b959 100644
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_VSSetShaderResources(ID3D11DeviceContext *iface,
|
||||
@@ -3090,8 +3963,28 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_OMSetRenderTargets(ID3D11De
|
||||
@@ -3173,8 +4047,28 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_OMSetRenderTargets(ID3D11De
|
||||
UINT render_target_view_count, ID3D11RenderTargetView *const *render_target_views,
|
||||
ID3D11DepthStencilView *depth_stencil_view)
|
||||
{
|
||||
@@ -1075,7 +1075,7 @@ index ebe8c03..791b959 100644
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_OMSetRenderTargetsAndUnorderedAccessViews(
|
||||
@@ -3111,15 +4004,44 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_OMSetRenderTargetsAndUnorde
|
||||
@@ -3194,15 +4088,44 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_OMSetRenderTargetsAndUnorde
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_OMSetBlendState(ID3D11DeviceContext *iface,
|
||||
ID3D11BlendState *blend_state, const float blend_factor[4], UINT sample_mask)
|
||||
{
|
||||
@@ -1122,7 +1122,7 @@ index ebe8c03..791b959 100644
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_SOSetTargets(ID3D11DeviceContext *iface, UINT buffer_count,
|
||||
@@ -3161,13 +4083,34 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_DispatchIndirect(ID3D11Devi
|
||||
@@ -3244,13 +4167,34 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_DispatchIndirect(ID3D11Devi
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_RSSetState(ID3D11DeviceContext *iface,
|
||||
ID3D11RasterizerState *rasterizer_state)
|
||||
{
|
||||
@@ -1159,7 +1159,7 @@ index ebe8c03..791b959 100644
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_RSSetScissorRects(ID3D11DeviceContext *iface,
|
||||
@@ -3282,8 +4225,18 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_HSSetShaderResources(ID3D11
|
||||
@@ -3365,8 +4309,18 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_HSSetShaderResources(ID3D11
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_HSSetShader(ID3D11DeviceContext *iface,
|
||||
ID3D11HullShader *shader, ID3D11ClassInstance *const *class_instances, UINT class_instance_count)
|
||||
{
|
||||
@@ -1179,7 +1179,7 @@ index ebe8c03..791b959 100644
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_HSSetSamplers(ID3D11DeviceContext *iface,
|
||||
@@ -3296,36 +4249,62 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_HSSetSamplers(ID3D11DeviceC
|
||||
@@ -3379,36 +4333,62 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_HSSetSamplers(ID3D11DeviceC
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_HSSetConstantBuffers(ID3D11DeviceContext *iface,
|
||||
UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers)
|
||||
{
|
||||
@@ -1247,7 +1247,7 @@ index ebe8c03..791b959 100644
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_CSSetShaderResources(ID3D11DeviceContext *iface,
|
||||
@@ -3626,7 +4605,15 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_CSGetConstantBuffers(ID3D11
|
||||
@@ -3709,7 +4689,15 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_CSGetConstantBuffers(ID3D11
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_ClearState(ID3D11DeviceContext *iface)
|
||||
{
|
||||
@@ -1264,7 +1264,7 @@ index ebe8c03..791b959 100644
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_Flush(ID3D11DeviceContext *iface)
|
||||
@@ -3651,9 +4638,29 @@ static UINT STDMETHODCALLTYPE d3d11_deferred_context_GetContextFlags(ID3D11Devic
|
||||
@@ -3734,9 +4722,29 @@ static UINT STDMETHODCALLTYPE d3d11_deferred_context_GetContextFlags(ID3D11Devic
|
||||
static HRESULT STDMETHODCALLTYPE d3d11_deferred_context_FinishCommandList(ID3D11DeviceContext *iface,
|
||||
BOOL restore, ID3D11CommandList **command_list)
|
||||
{
|
||||
@@ -1296,7 +1296,7 @@ index ebe8c03..791b959 100644
|
||||
}
|
||||
|
||||
static const struct ID3D11DeviceContextVtbl d3d11_deferred_context_vtbl =
|
||||
@@ -4268,6 +5275,8 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateDeferredContext(ID3D11Device
|
||||
@@ -4351,6 +5359,8 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateDeferredContext(ID3D11Device
|
||||
object->device = iface;
|
||||
object->refcount = 1;
|
||||
|
||||
@@ -1306,5 +1306,5 @@ index ebe8c03..791b959 100644
|
||||
wined3d_private_store_init(&object->private_store);
|
||||
|
||||
--
|
||||
1.9.1
|
||||
2.20.1
|
||||
|
||||
|
@@ -1,137 +0,0 @@
|
||||
From 64e8c4698047a079d4a538d1774f194529570453 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Wed, 3 Jun 2015 22:57:21 +0200
|
||||
Subject: [PATCH] winex11.drv: Allow changing the opengl pixel format on the
|
||||
desktop window.
|
||||
|
||||
This patch is not 100% correct because the old behavior was more similar to
|
||||
windows. However, Direct3D supports using the desktop window to create a
|
||||
context and since Wine translates Direct3D to OpenGL, using the desktop
|
||||
window will fail because of this limitation. Unless someone comes up with
|
||||
a more correct solution or finds an application that breaks because of this,
|
||||
it seems to be a suitable workaround as it fixes multiple applications.
|
||||
---
|
||||
dlls/d3d10_1/tests/d3d10_1.c | 16 +++++++++++++---
|
||||
dlls/d3d11/tests/d3d11.c | 22 +++++++++++++++++-----
|
||||
dlls/d3d9/tests/device.c | 16 ++++++++++++++++
|
||||
dlls/winex11.drv/opengl.c | 5 ++++-
|
||||
4 files changed, 50 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d10_1/tests/d3d10_1.c b/dlls/d3d10_1/tests/d3d10_1.c
|
||||
index 7c2b3ba..5d111d9 100644
|
||||
--- a/dlls/d3d10_1/tests/d3d10_1.c
|
||||
+++ b/dlls/d3d10_1/tests/d3d10_1.c
|
||||
@@ -252,9 +252,19 @@ static void test_create_device(void)
|
||||
swapchain_desc.OutputWindow = NULL;
|
||||
hr = D3D10CreateDeviceAndSwapChain1(NULL, D3D10_DRIVER_TYPE_HARDWARE, NULL, 0,
|
||||
supported_feature_level, D3D10_1_SDK_VERSION, &swapchain_desc, &swapchain, &device);
|
||||
- ok(hr == DXGI_ERROR_INVALID_CALL, "D3D10CreateDeviceAndSwapChain1 returned %#x.\n", hr);
|
||||
- ok(!swapchain, "Got unexpected swapchain pointer %p.\n", swapchain);
|
||||
- ok(!device, "Got unexpected device pointer %p.\n", device);
|
||||
+ todo_wine ok(hr == DXGI_ERROR_INVALID_CALL, "D3D10CreateDeviceAndSwapChain1 returned %#x.\n", hr);
|
||||
+ if (SUCCEEDED(hr))
|
||||
+ {
|
||||
+ refcount = IDXGISwapChain_Release(swapchain);
|
||||
+ ok(!refcount, "Swapchain has %u references left.\n", refcount);
|
||||
+ refcount = ID3D10Device1_Release(device);
|
||||
+ ok(!refcount, "Device has %u references left.\n", refcount);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ ok(!swapchain, "Got unexpected swapchain pointer %p.\n", swapchain);
|
||||
+ ok(!device, "Got unexpected device pointer %p.\n", device);
|
||||
+ }
|
||||
|
||||
swapchain = (IDXGISwapChain *)0xdeadbeef;
|
||||
device = (ID3D10Device1 *)0xdeadbeef;
|
||||
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
|
||||
index 5a36bc2..1c07775 100644
|
||||
--- a/dlls/d3d11/tests/d3d11.c
|
||||
+++ b/dlls/d3d11/tests/d3d11.c
|
||||
@@ -1705,11 +1705,23 @@ static void test_create_device(void)
|
||||
swapchain_desc.OutputWindow = NULL;
|
||||
hr = D3D11CreateDeviceAndSwapChain(NULL, D3D_DRIVER_TYPE_HARDWARE, NULL, 0, NULL, 0, D3D11_SDK_VERSION,
|
||||
&swapchain_desc, &swapchain, &device, &feature_level, &immediate_context);
|
||||
- ok(hr == DXGI_ERROR_INVALID_CALL, "D3D11CreateDeviceAndSwapChain returned %#x.\n", hr);
|
||||
- ok(!swapchain, "Got unexpected swapchain pointer %p.\n", swapchain);
|
||||
- ok(!device, "Got unexpected device pointer %p.\n", device);
|
||||
- ok(!feature_level, "Got unexpected feature level %#x.\n", feature_level);
|
||||
- ok(!immediate_context, "Got unexpected immediate context pointer %p.\n", immediate_context);
|
||||
+ todo_wine ok(hr == DXGI_ERROR_INVALID_CALL, "D3D11CreateDeviceAndSwapChain returned %#x.\n", hr);
|
||||
+ if (SUCCEEDED(hr))
|
||||
+ {
|
||||
+ refcount = IDXGISwapChain_Release(swapchain);
|
||||
+ ok(!refcount, "Swapchain has %u references left.\n", refcount);
|
||||
+ refcount = ID3D11DeviceContext_Release(immediate_context);
|
||||
+ ok(!refcount, "Immediate context has %u references left.\n", refcount);
|
||||
+ refcount = ID3D11Device_Release(device);
|
||||
+ ok(!refcount, "Device has %u references left.\n", refcount);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ ok(!swapchain, "Got unexpected swapchain pointer %p.\n", swapchain);
|
||||
+ ok(!device, "Got unexpected device pointer %p.\n", device);
|
||||
+ ok(!feature_level, "Got unexpected feature level %#x.\n", feature_level);
|
||||
+ ok(!immediate_context, "Got unexpected immediate context pointer %p.\n", immediate_context);
|
||||
+ }
|
||||
|
||||
swapchain = (IDXGISwapChain *)0xdeadbeef;
|
||||
device = (ID3D11Device *)0xdeadbeef;
|
||||
diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c
|
||||
index 6084fd2..3480de0 100644
|
||||
--- a/dlls/d3d9/tests/device.c
|
||||
+++ b/dlls/d3d9/tests/device.c
|
||||
@@ -12418,6 +12418,21 @@ static void test_stretch_rect(void)
|
||||
DestroyWindow(window);
|
||||
}
|
||||
|
||||
+static void test_desktop_window(void)
|
||||
+{
|
||||
+ IDirect3DDevice9 *device = NULL;
|
||||
+ IDirect3D9 *d3d;
|
||||
+
|
||||
+ d3d = Direct3DCreate9(D3D_SDK_VERSION);
|
||||
+ ok(!!d3d, "Failed to create a D3D object.\n");
|
||||
+
|
||||
+ device = create_device(d3d, GetDesktopWindow(), NULL);
|
||||
+ ok(!!device, "Failed to created device on desktop window.\n");
|
||||
+
|
||||
+ if (device) IDirect3DDevice9_Release(device);
|
||||
+ IDirect3D9_Release(d3d);
|
||||
+}
|
||||
+
|
||||
START_TEST(device)
|
||||
{
|
||||
WNDCLASSA wc = {0};
|
||||
@@ -12538,6 +12553,7 @@ START_TEST(device)
|
||||
test_format_unknown();
|
||||
test_destroyed_window();
|
||||
test_lockable_backbuffer();
|
||||
+ test_desktop_window();
|
||||
test_clip_planes_limits();
|
||||
test_swapchain_multisample_reset();
|
||||
test_stretch_rect();
|
||||
diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c
|
||||
index 01b92e3..0b5abb5 100644
|
||||
--- a/dlls/winex11.drv/opengl.c
|
||||
+++ b/dlls/winex11.drv/opengl.c
|
||||
@@ -1455,12 +1455,15 @@ static BOOL set_pixel_format(HDC hdc, int format, BOOL allow_change)
|
||||
|
||||
TRACE("(%p,%d)\n", hdc, format);
|
||||
|
||||
- if (!hwnd || hwnd == GetDesktopWindow())
|
||||
+ if (!hwnd)
|
||||
{
|
||||
WARN( "not a valid window DC %p/%p\n", hdc, hwnd );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
+ if (hwnd == GetDesktopWindow())
|
||||
+ FIXME("Using desktop window for OpenGL is not supported on windows\n");
|
||||
+
|
||||
fmt = get_pixel_format(gdi_display, format, FALSE /* Offscreen */);
|
||||
if (!fmt)
|
||||
{
|
||||
--
|
||||
2.7.4
|
||||
|
@@ -1 +0,0 @@
|
||||
Fixes: [18490] Allow to set pixel format for desktop window
|
@@ -3,7 +3,3 @@ Fixes: [33768] Fix texture corruption in CSI: Fatal Conspiracy
|
||||
Fixes: [37391] Exception during start of fr-043 caused by missing DXTn support
|
||||
Fixes: [34692] Fix wrong colors in Wolfenstein (2009)
|
||||
Fixes: [24983] Fix crash in Space Rangers2 caused by missing DXTn support
|
||||
# 9fb5745a7997bbfe033779650f1193d85369cef2 broke this, in a way that's not
|
||||
# trivial to fix. Guess we'll wait to see what Alexandre has in mind for the
|
||||
# other D3D DLLs.
|
||||
Disabled: true
|
||||
|
@@ -1,17 +1,17 @@
|
||||
From 64f08bf065be9b766dce1c52a0be260dc1e26679 Mon Sep 17 00:00:00 2001
|
||||
From 826f68ed53563b81d225b49131bbd3595c6d885b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sun, 6 Sep 2015 20:21:42 +0200
|
||||
Subject: ddraw: Set dwZBufferBitDepth in ddraw7_GetCaps.
|
||||
Subject: [PATCH] ddraw: Set dwZBufferBitDepth in ddraw7_GetCaps.
|
||||
|
||||
---
|
||||
dlls/ddraw/ddraw.c | 24 ++++++++++++++++++++++++
|
||||
1 file changed, 24 insertions(+)
|
||||
|
||||
diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c
|
||||
index c94bfee..77a1bea 100644
|
||||
index 8d608656143..cc8adccf049 100644
|
||||
--- a/dlls/ddraw/ddraw.c
|
||||
+++ b/dlls/ddraw/ddraw.c
|
||||
@@ -1420,6 +1420,28 @@ HRESULT ddraw_get_d3dcaps(const struct ddraw *ddraw, D3DDEVICEDESC7 *caps)
|
||||
@@ -1434,6 +1434,28 @@ HRESULT ddraw_get_d3dcaps(const struct ddraw *ddraw, D3DDEVICEDESC7 *caps)
|
||||
return DD_OK;
|
||||
}
|
||||
|
||||
@@ -40,15 +40,15 @@ index c94bfee..77a1bea 100644
|
||||
/*****************************************************************************
|
||||
* IDirectDraw7::GetCaps
|
||||
*
|
||||
@@ -1500,6 +1522,8 @@ static HRESULT WINAPI ddraw7_GetCaps(IDirectDraw7 *iface, DDCAPS *DriverCaps, DD
|
||||
@@ -1514,6 +1536,8 @@ static HRESULT WINAPI ddraw7_GetCaps(IDirectDraw7 *iface, DDCAPS *DriverCaps, DD
|
||||
caps.dwCaps |= DDCAPS_ALIGNSTRIDE;
|
||||
caps.dwAlignStrideAlign = DDRAW_STRIDE_ALIGNMENT;
|
||||
|
||||
+ IDirect3D7_EnumZBufferFormats(&ddraw->IDirect3D7_iface, &IID_IDirect3DHALDevice, enum_zbuffer, &caps);
|
||||
+
|
||||
caps.ddsOldCaps.dwCaps = caps.ddsCaps.dwCaps;
|
||||
|
||||
if(DriverCaps)
|
||||
{
|
||||
DD_STRUCT_COPY_BYSIZE(DriverCaps, &caps);
|
||||
--
|
||||
2.5.1
|
||||
2.20.1
|
||||
|
||||
|
@@ -1,205 +0,0 @@
|
||||
From 1b741a4b555ad98a769fdb9fa659134b83293a4e 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.
|
||||
|
||||
---
|
||||
dlls/ddraw/ddraw.c | 2 ++
|
||||
dlls/ddraw/tests/ddraw1.c | 26 ++++++++++++++++++++++++++
|
||||
dlls/ddraw/tests/ddraw2.c | 26 ++++++++++++++++++++++++++
|
||||
dlls/ddraw/tests/ddraw4.c | 26 ++++++++++++++++++++++++++
|
||||
dlls/ddraw/tests/ddraw7.c | 26 ++++++++++++++++++++++++++
|
||||
5 files changed, 106 insertions(+)
|
||||
|
||||
diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c
|
||||
index fad185e..ebf91b3 100644
|
||||
--- a/dlls/ddraw/ddraw.c
|
||||
+++ b/dlls/ddraw/ddraw.c
|
||||
@@ -1543,6 +1543,8 @@ static HRESULT WINAPI ddraw7_GetCaps(IDirectDraw7 *iface, DDCAPS *DriverCaps, DD
|
||||
caps.dwCaps |= DDCAPS_ALIGNSTRIDE;
|
||||
caps.dwAlignStrideAlign = DDRAW_STRIDE_ALIGNMENT;
|
||||
|
||||
+ caps.ddsOldCaps.dwCaps = caps.ddsCaps.dwCaps;
|
||||
+
|
||||
IDirect3D7_EnumZBufferFormats(&ddraw->IDirect3D7_iface, &IID_IDirect3DHALDevice, enum_zbuffer, &caps);
|
||||
|
||||
if(DriverCaps)
|
||||
diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c
|
||||
index 59d07b7..5d81abb 100644
|
||||
--- a/dlls/ddraw/tests/ddraw1.c
|
||||
+++ b/dlls/ddraw/tests/ddraw1.c
|
||||
@@ -11581,6 +11581,31 @@ static void test_execute_data(void)
|
||||
DestroyWindow(window);
|
||||
}
|
||||
|
||||
+static void test_caps(void)
|
||||
+{
|
||||
+ IDirectDraw *ddraw;
|
||||
+ DDCAPS caps, caps2;
|
||||
+ HRESULT hr;
|
||||
+
|
||||
+ ddraw = create_ddraw();
|
||||
+ ok(!!ddraw, "Failed to create a ddraw object.\n");
|
||||
+
|
||||
+ caps.dwSize = sizeof(caps);
|
||||
+ caps2.dwSize = sizeof(caps2);
|
||||
+ hr = IDirectDraw_GetCaps(ddraw, &caps, &caps2);
|
||||
+ ok(SUCCEEDED(hr), "Failed to query for caps, hr %#x.\n", hr);
|
||||
+
|
||||
+ ok(caps.ddsOldCaps.dwCaps == caps.ddsCaps.dwCaps,
|
||||
+ "Expected hal ddsOldCaps and ddsCaps to be identical (%x vs %x).\n",
|
||||
+ caps.ddsOldCaps.dwCaps, caps.ddsCaps.dwCaps);
|
||||
+
|
||||
+ ok(caps2.ddsOldCaps.dwCaps == caps2.ddsCaps.dwCaps,
|
||||
+ "Expected hel ddsOldCaps and ddsCaps to be identical (%x vs %x).\n",
|
||||
+ caps2.ddsOldCaps.dwCaps, caps2.ddsCaps.dwCaps);
|
||||
+
|
||||
+ IDirectDraw_Release(ddraw);
|
||||
+}
|
||||
+
|
||||
static void test_viewport(void)
|
||||
{
|
||||
static struct
|
||||
@@ -12068,6 +12093,7 @@ START_TEST(ddraw1)
|
||||
test_depth_readback();
|
||||
test_clear();
|
||||
test_enum_surfaces();
|
||||
+ test_caps();
|
||||
test_execute_data();
|
||||
test_viewport();
|
||||
test_find_device();
|
||||
diff --git a/dlls/ddraw/tests/ddraw2.c b/dlls/ddraw/tests/ddraw2.c
|
||||
index 8b9b249..b9b964d 100644
|
||||
--- a/dlls/ddraw/tests/ddraw2.c
|
||||
+++ b/dlls/ddraw/tests/ddraw2.c
|
||||
@@ -12862,6 +12862,31 @@ static void test_enum_surfaces(void)
|
||||
IDirectDraw2_Release(ddraw);
|
||||
}
|
||||
|
||||
+static void test_caps(void)
|
||||
+{
|
||||
+ IDirectDraw2 *ddraw;
|
||||
+ DDCAPS caps, caps2;
|
||||
+ HRESULT hr;
|
||||
+
|
||||
+ ddraw = create_ddraw();
|
||||
+ ok(!!ddraw, "Failed to create a ddraw object.\n");
|
||||
+
|
||||
+ caps.dwSize = sizeof(caps);
|
||||
+ caps2.dwSize = sizeof(caps2);
|
||||
+ hr = IDirectDraw2_GetCaps(ddraw, &caps, &caps2);
|
||||
+ ok(SUCCEEDED(hr), "Failed to query for caps, hr %#x.\n", hr);
|
||||
+
|
||||
+ ok(caps.ddsOldCaps.dwCaps == caps.ddsCaps.dwCaps,
|
||||
+ "Expected hal ddsOldCaps and ddsCaps to be identical (%x vs %x).\n",
|
||||
+ caps.ddsOldCaps.dwCaps, caps.ddsCaps.dwCaps);
|
||||
+
|
||||
+ ok(caps2.ddsOldCaps.dwCaps == caps2.ddsCaps.dwCaps,
|
||||
+ "Expected hel ddsOldCaps and ddsCaps to be identical (%x vs %x).\n",
|
||||
+ caps2.ddsOldCaps.dwCaps, caps2.ddsCaps.dwCaps);
|
||||
+
|
||||
+ IDirectDraw2_Release(ddraw);
|
||||
+}
|
||||
+
|
||||
static void test_viewport(void)
|
||||
{
|
||||
static struct
|
||||
@@ -13378,6 +13403,7 @@ START_TEST(ddraw2)
|
||||
test_depth_readback();
|
||||
test_clear();
|
||||
test_enum_surfaces();
|
||||
+ test_caps();
|
||||
test_viewport();
|
||||
test_find_device();
|
||||
test_killfocus();
|
||||
diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c
|
||||
index 1c48418..306f233 100644
|
||||
--- a/dlls/ddraw/tests/ddraw4.c
|
||||
+++ b/dlls/ddraw/tests/ddraw4.c
|
||||
@@ -15472,6 +15472,31 @@ static void test_sysmem_draw(void)
|
||||
DestroyWindow(window);
|
||||
}
|
||||
|
||||
+static void test_caps(void)
|
||||
+{
|
||||
+ IDirectDraw4 *ddraw;
|
||||
+ DDCAPS caps, caps2;
|
||||
+ HRESULT hr;
|
||||
+
|
||||
+ ddraw = create_ddraw();
|
||||
+ ok(!!ddraw, "Failed to create a ddraw object.\n");
|
||||
+
|
||||
+ caps.dwSize = sizeof(caps);
|
||||
+ caps2.dwSize = sizeof(caps2);
|
||||
+ hr = IDirectDraw4_GetCaps(ddraw, &caps, &caps2);
|
||||
+ ok(SUCCEEDED(hr), "Failed to query for caps, hr %#x.\n", hr);
|
||||
+
|
||||
+ ok(caps.ddsOldCaps.dwCaps == caps.ddsCaps.dwCaps,
|
||||
+ "Expected hal ddsOldCaps and ddsCaps to be identical (%x vs %x).\n",
|
||||
+ caps.ddsOldCaps.dwCaps, caps.ddsCaps.dwCaps);
|
||||
+
|
||||
+ ok(caps2.ddsOldCaps.dwCaps == caps2.ddsCaps.dwCaps,
|
||||
+ "Expected hel ddsOldCaps and ddsCaps to be identical (%x vs %x).\n",
|
||||
+ caps2.ddsOldCaps.dwCaps, caps2.ddsCaps.dwCaps);
|
||||
+
|
||||
+ IDirectDraw4_Release(ddraw);
|
||||
+}
|
||||
+
|
||||
START_TEST(ddraw4)
|
||||
{
|
||||
DDDEVICEIDENTIFIER identifier;
|
||||
@@ -15597,6 +15622,7 @@ START_TEST(ddraw4)
|
||||
test_depth_readback();
|
||||
test_clear();
|
||||
test_enum_surfaces();
|
||||
+ test_caps();
|
||||
test_viewport();
|
||||
test_find_device();
|
||||
test_killfocus();
|
||||
diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c
|
||||
index a125200..da777d8 100644
|
||||
--- a/dlls/ddraw/tests/ddraw7.c
|
||||
+++ b/dlls/ddraw/tests/ddraw7.c
|
||||
@@ -15198,6 +15198,31 @@ static void test_sysmem_draw(void)
|
||||
DestroyWindow(window);
|
||||
}
|
||||
|
||||
+static void test_caps(void)
|
||||
+{
|
||||
+ IDirectDraw7 *ddraw;
|
||||
+ DDCAPS caps, caps2;
|
||||
+ HRESULT hr;
|
||||
+
|
||||
+ ddraw = create_ddraw();
|
||||
+ ok(!!ddraw, "Failed to create a ddraw object.\n");
|
||||
+
|
||||
+ caps.dwSize = sizeof(caps);
|
||||
+ caps2.dwSize = sizeof(caps2);
|
||||
+ hr = IDirectDraw7_GetCaps(ddraw, &caps, &caps2);
|
||||
+ ok(SUCCEEDED(hr), "Failed to query for caps, hr %#x.\n", hr);
|
||||
+
|
||||
+ ok(caps.ddsOldCaps.dwCaps == caps.ddsCaps.dwCaps,
|
||||
+ "Expected hal ddsOldCaps and ddsCaps to be identical (%x vs %x).\n",
|
||||
+ caps.ddsOldCaps.dwCaps, caps.ddsCaps.dwCaps);
|
||||
+
|
||||
+ ok(caps2.ddsOldCaps.dwCaps == caps2.ddsCaps.dwCaps,
|
||||
+ "Expected hel ddsOldCaps and ddsCaps to be identical (%x vs %x).\n",
|
||||
+ caps2.ddsOldCaps.dwCaps, caps2.ddsCaps.dwCaps);
|
||||
+
|
||||
+ IDirectDraw7_Release(ddraw);
|
||||
+}
|
||||
+
|
||||
START_TEST(ddraw7)
|
||||
{
|
||||
DDDEVICEIDENTIFIER2 identifier;
|
||||
@@ -15335,6 +15360,7 @@ START_TEST(ddraw7)
|
||||
test_enum_surfaces();
|
||||
test_viewport();
|
||||
test_device_load();
|
||||
+ test_caps();
|
||||
test_color_vertex();
|
||||
test_killfocus();
|
||||
test_sysmem_draw();
|
||||
--
|
||||
1.9.1
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 1b4c479e85db593612a550cac2f3f9b562a3ac6c Mon Sep 17 00:00:00 2001
|
||||
From bf5df83b1be55676dcd539b79d0f2ceabb9409a5 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Gofman <gofmanp@gmail.com>
|
||||
Date: Thu, 4 Apr 2019 02:25:00 +0300
|
||||
Subject: [PATCH] ddraw: Allow setting texture without DDSCAPS_TEXTURE for
|
||||
@@ -11,10 +11,10 @@ Signed-off-by: Paul Gofman <gofmanp@gmail.com>
|
||||
2 files changed, 141 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c
|
||||
index 9c2de58cac..c0bb93794d 100644
|
||||
index 1d176970c6..9b6c9af570 100644
|
||||
--- a/dlls/ddraw/device.c
|
||||
+++ b/dlls/ddraw/device.c
|
||||
@@ -2946,10 +2946,8 @@ static HRESULT WINAPI d3d_device3_SetLightState(IDirect3DDevice3 *iface,
|
||||
@@ -2910,10 +2910,8 @@ static HRESULT WINAPI d3d_device3_SetLightState(IDirect3DDevice3 *iface,
|
||||
wined3d_mutex_unlock();
|
||||
return DDERR_INVALIDPARAMS;
|
||||
}
|
||||
@@ -25,7 +25,7 @@ index 9c2de58cac..c0bb93794d 100644
|
||||
device->material = value;
|
||||
}
|
||||
else if (state == D3DLIGHTSTATE_COLORMODEL)
|
||||
@@ -4820,7 +4818,8 @@ static HRESULT d3d_device7_SetTexture(IDirect3DDevice7 *iface,
|
||||
@@ -4794,7 +4792,8 @@ static HRESULT d3d_device7_SetTexture(IDirect3DDevice7 *iface,
|
||||
struct ddraw_surface *surf = unsafe_impl_from_IDirectDrawSurface7(texture);
|
||||
struct wined3d_texture *wined3d_texture = NULL;
|
||||
|
||||
@@ -35,19 +35,16 @@ index 9c2de58cac..c0bb93794d 100644
|
||||
|
||||
if (surf && (surf->surface_desc.ddsCaps.dwCaps & DDSCAPS_TEXTURE))
|
||||
wined3d_texture = surf->wined3d_texture;
|
||||
@@ -4856,8 +4855,8 @@ static HRESULT WINAPI d3d_device3_SetTexture(IDirect3DDevice3 *iface,
|
||||
@@ -4830,19 +4829,30 @@ static HRESULT WINAPI d3d_device3_SetTexture(IDirect3DDevice3 *iface,
|
||||
{
|
||||
struct d3d_device *device = impl_from_IDirect3DDevice3(iface);
|
||||
struct ddraw_surface *tex = unsafe_impl_from_IDirect3DTexture2(texture);
|
||||
+ struct wined3d_texture *wined3d_texture;
|
||||
DWORD texmapblend;
|
||||
- HRESULT hr;
|
||||
+ struct wined3d_texture *wined3d_texture;
|
||||
|
||||
TRACE("iface %p, stage %u, texture %p.\n", iface, stage, texture);
|
||||
|
||||
@@ -4866,7 +4865,18 @@ static HRESULT WINAPI d3d_device3_SetTexture(IDirect3DDevice3 *iface,
|
||||
if (device->legacyTextureBlending)
|
||||
IDirect3DDevice3_GetRenderState(iface, D3DRENDERSTATE_TEXTUREMAPBLEND, &texmapblend);
|
||||
wined3d_mutex_lock();
|
||||
|
||||
- hr = IDirect3DDevice7_SetTexture(&device->IDirect3DDevice7_iface, stage, &tex->IDirectDrawSurface7_iface);
|
||||
+ if (tex && ((tex->surface_desc.ddsCaps.dwCaps & DDSCAPS_TEXTURE) || !device->hw))
|
||||
@@ -63,9 +60,7 @@ index 9c2de58cac..c0bb93794d 100644
|
||||
+
|
||||
+ wined3d_device_set_texture(device->wined3d_device, stage, wined3d_texture);
|
||||
|
||||
if (device->legacyTextureBlending && texmapblend == D3DTBLEND_MODULATE)
|
||||
{
|
||||
@@ -4898,7 +4908,7 @@ static HRESULT WINAPI d3d_device3_SetTexture(IDirect3DDevice3 *iface,
|
||||
fixup_texture_alpha_op(device);
|
||||
|
||||
wined3d_mutex_unlock();
|
||||
|
||||
@@ -75,10 +70,10 @@ index 9c2de58cac..c0bb93794d 100644
|
||||
|
||||
static const struct tss_lookup
|
||||
diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c
|
||||
index abf745aecb..26a021b429 100644
|
||||
index bc58c1817c..3c643afe15 100644
|
||||
--- a/dlls/ddraw/tests/ddraw4.c
|
||||
+++ b/dlls/ddraw/tests/ddraw4.c
|
||||
@@ -329,7 +329,7 @@ static IDirectDraw4 *create_ddraw(void)
|
||||
@@ -330,7 +330,7 @@ static IDirectDraw4 *create_ddraw(void)
|
||||
return ddraw4;
|
||||
}
|
||||
|
||||
@@ -87,7 +82,7 @@ index abf745aecb..26a021b429 100644
|
||||
{
|
||||
IDirectDrawSurface4 *surface, *ds;
|
||||
IDirect3DDevice3 *device = NULL;
|
||||
@@ -349,6 +349,8 @@ static IDirect3DDevice3 *create_device(HWND window, DWORD coop_level)
|
||||
@@ -350,6 +350,8 @@ static IDirect3DDevice3 *create_device(HWND window, DWORD coop_level)
|
||||
surface_desc.dwSize = sizeof(surface_desc);
|
||||
surface_desc.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT;
|
||||
surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE;
|
||||
@@ -96,7 +91,7 @@ index abf745aecb..26a021b429 100644
|
||||
surface_desc.dwWidth = 640;
|
||||
surface_desc.dwHeight = 480;
|
||||
|
||||
@@ -377,7 +379,8 @@ static IDirect3DDevice3 *create_device(HWND window, DWORD coop_level)
|
||||
@@ -378,7 +380,8 @@ static IDirect3DDevice3 *create_device(HWND window, DWORD coop_level)
|
||||
}
|
||||
|
||||
memset(&z_fmt, 0, sizeof(z_fmt));
|
||||
@@ -106,7 +101,7 @@ index abf745aecb..26a021b429 100644
|
||||
if (FAILED(hr) || !z_fmt.dwSize)
|
||||
{
|
||||
IDirect3D3_Release(d3d3);
|
||||
@@ -389,6 +392,8 @@ static IDirect3DDevice3 *create_device(HWND window, DWORD coop_level)
|
||||
@@ -390,6 +393,8 @@ static IDirect3DDevice3 *create_device(HWND window, DWORD coop_level)
|
||||
surface_desc.dwSize = sizeof(surface_desc);
|
||||
surface_desc.dwFlags = DDSD_CAPS | DDSD_PIXELFORMAT | DDSD_WIDTH | DDSD_HEIGHT;
|
||||
surface_desc.ddsCaps.dwCaps = DDSCAPS_ZBUFFER;
|
||||
@@ -115,7 +110,7 @@ index abf745aecb..26a021b429 100644
|
||||
U4(surface_desc).ddpfPixelFormat = z_fmt;
|
||||
surface_desc.dwWidth = 640;
|
||||
surface_desc.dwHeight = 480;
|
||||
@@ -411,7 +416,8 @@ static IDirect3DDevice3 *create_device(HWND window, DWORD coop_level)
|
||||
@@ -412,7 +417,8 @@ static IDirect3DDevice3 *create_device(HWND window, DWORD coop_level)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -125,7 +120,7 @@ index abf745aecb..26a021b429 100644
|
||||
IDirect3D3_Release(d3d3);
|
||||
IDirectDrawSurface4_Release(surface);
|
||||
if (FAILED(hr))
|
||||
@@ -420,6 +426,11 @@ static IDirect3DDevice3 *create_device(HWND window, DWORD coop_level)
|
||||
@@ -421,6 +427,11 @@ static IDirect3DDevice3 *create_device(HWND window, DWORD coop_level)
|
||||
return device;
|
||||
}
|
||||
|
||||
@@ -137,8 +132,8 @@ index abf745aecb..26a021b429 100644
|
||||
static IDirect3DViewport3 *create_viewport(IDirect3DDevice3 *device, UINT x, UINT y, UINT w, UINT h)
|
||||
{
|
||||
IDirect3DViewport3 *viewport;
|
||||
@@ -16023,6 +16034,116 @@ static void test_caps(void)
|
||||
IDirectDraw4_Release(ddraw);
|
||||
@@ -16383,6 +16394,116 @@ static void test_d32_support(void)
|
||||
DestroyWindow(window);
|
||||
}
|
||||
|
||||
+static void test_texture_wrong_caps_(BOOL software)
|
||||
@@ -254,11 +249,13 @@ index abf745aecb..26a021b429 100644
|
||||
START_TEST(ddraw4)
|
||||
{
|
||||
DDDEVICEIDENTIFIER identifier;
|
||||
@@ -16156,4 +16277,5 @@ START_TEST(ddraw4)
|
||||
@@ -16515,6 +16636,7 @@ START_TEST(ddraw4)
|
||||
test_gdi_surface();
|
||||
test_alphatest();
|
||||
test_clipper_refcount();
|
||||
+ test_texture_wrong_caps();
|
||||
test_caps();
|
||||
test_d32_support();
|
||||
}
|
||||
--
|
||||
2.20.1
|
||||
|
@@ -1,15 +1,15 @@
|
||||
From 1171e61b81f598728dd5f242494a37dc74fb2870 Mon Sep 17 00:00:00 2001
|
||||
From 16d001f5562c37ac293fa547feef19887e635363 Mon Sep 17 00:00:00 2001
|
||||
From: Andrew D'Addesio <andrew@fatbag.net>
|
||||
Date: Fri, 8 Feb 2019 18:48:33 -1000
|
||||
Subject: [PATCH] ddraw: Return correct devices based off requested DirectX
|
||||
version.
|
||||
|
||||
---
|
||||
dlls/ddraw/ddraw.c | 233 +++++++++++++++++++++++++--------------------
|
||||
1 file changed, 132 insertions(+), 101 deletions(-)
|
||||
dlls/ddraw/ddraw.c | 231 +++++++++++++++++++++++++--------------------
|
||||
1 file changed, 130 insertions(+), 101 deletions(-)
|
||||
|
||||
diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c
|
||||
index 8a1d0a4f487..691ea7a6ef9 100644
|
||||
index 83eeb33589e..324a149a425 100644
|
||||
--- a/dlls/ddraw/ddraw.c
|
||||
+++ b/dlls/ddraw/ddraw.c
|
||||
@@ -47,37 +47,80 @@ static const DDDEVICEIDENTIFIER2 deviceidentifier =
|
||||
@@ -47,7 +47,8 @@ index 8a1d0a4f487..691ea7a6ef9 100644
|
||||
|
||||
- /* HAL device */
|
||||
+ /* RGB Emulation (D3D 1-7) */
|
||||
+ {
|
||||
{
|
||||
- "WINE Direct3D7 Hardware acceleration using WineD3D",
|
||||
+ D3D_VERSION(1)|D3D_VERSION(2)|D3D_VERSION(3)|D3D_VERSION(7),
|
||||
+ "WineD3D RGB Software Emulation",
|
||||
+ "RGB Emulation",
|
||||
@@ -56,8 +57,7 @@ index 8a1d0a4f487..691ea7a6ef9 100644
|
||||
+ },
|
||||
+
|
||||
+ /* Direct3D HAL (D3D 1-7) */
|
||||
{
|
||||
- "WINE Direct3D7 Hardware acceleration using WineD3D",
|
||||
+ {
|
||||
+ D3D_VERSION(1)|D3D_VERSION(2)|D3D_VERSION(3)|D3D_VERSION(7),
|
||||
+ "WineD3D Hardware Acceleration",
|
||||
"Direct3D HAL",
|
||||
@@ -77,7 +77,7 @@ index 8a1d0a4f487..691ea7a6ef9 100644
|
||||
+ "MMX Emulation",
|
||||
+ &IID_IDirect3DMMXDevice,
|
||||
+ 0,
|
||||
},
|
||||
+ },
|
||||
+
|
||||
+ /* Direct3D T&L HAL (D3D7 only) */
|
||||
+ {
|
||||
@@ -86,7 +86,7 @@ index 8a1d0a4f487..691ea7a6ef9 100644
|
||||
+ "Direct3D T&L HAL",
|
||||
+ &IID_IDirect3DTnLHalDevice,
|
||||
+ 0,
|
||||
+ },
|
||||
},
|
||||
+
|
||||
+ /* In the future, we may wish to add the "Reference Rasterizer" and
|
||||
+ * "Null device", which are only available in DX6-8 and must be explicitly
|
||||
@@ -106,7 +106,7 @@ index 8a1d0a4f487..691ea7a6ef9 100644
|
||||
};
|
||||
|
||||
static void STDMETHODCALLTYPE ddraw_null_wined3d_object_destroyed(void *parent) {}
|
||||
@@ -1396,15 +1439,6 @@ HRESULT ddraw_get_d3dcaps(const struct ddraw *ddraw, D3DDEVICEDESC7 *caps)
|
||||
@@ -1389,15 +1432,6 @@ HRESULT ddraw_get_d3dcaps(const struct ddraw *ddraw, D3DDEVICEDESC7 *caps)
|
||||
D3DPTADDRESSCAPS_WRAP | D3DPTADDRESSCAPS_MIRROR | D3DPTADDRESSCAPS_CLAMP |
|
||||
D3DPTADDRESSCAPS_BORDER | D3DPTADDRESSCAPS_INDEPENDENTUV);
|
||||
|
||||
@@ -122,16 +122,7 @@ index 8a1d0a4f487..691ea7a6ef9 100644
|
||||
/* Fill the missing members, and do some fixup */
|
||||
caps->dpcLineCaps.dwSize = sizeof(caps->dpcLineCaps);
|
||||
caps->dpcLineCaps.dwTextureBlendCaps = D3DPTBLENDCAPS_ADD
|
||||
@@ -1547,6 +1581,8 @@ static HRESULT WINAPI ddraw7_GetCaps(IDirectDraw7 *iface, DDCAPS *DriverCaps, DD
|
||||
|
||||
IDirect3D7_EnumZBufferFormats(&ddraw->IDirect3D7_iface, &IID_IDirect3DHALDevice, enum_zbuffer, &caps);
|
||||
|
||||
+ caps.ddsOldCaps.dwCaps = caps.ddsCaps.dwCaps;
|
||||
+
|
||||
if(DriverCaps)
|
||||
{
|
||||
DD_STRUCT_COPY_BYSIZE(DriverCaps, &caps);
|
||||
@@ -3669,8 +3705,7 @@ static HRESULT WINAPI ddraw1_DuplicateSurface(IDirectDraw *iface, IDirectDrawSur
|
||||
@@ -3713,8 +3747,7 @@ static HRESULT WINAPI ddraw1_DuplicateSurface(IDirectDraw *iface, IDirectDrawSur
|
||||
/*****************************************************************************
|
||||
* IDirect3D7::EnumDevices
|
||||
*
|
||||
@@ -141,7 +132,7 @@ index 8a1d0a4f487..691ea7a6ef9 100644
|
||||
*
|
||||
* Params:
|
||||
* callback: Function to call for each enumerated device
|
||||
@@ -3703,14 +3738,17 @@ static HRESULT WINAPI d3d7_EnumDevices(IDirect3D7 *iface, LPD3DENUMDEVICESCALLBA
|
||||
@@ -3747,14 +3780,17 @@ static HRESULT WINAPI d3d7_EnumDevices(IDirect3D7 *iface, LPD3DENUMDEVICESCALLBA
|
||||
|
||||
dev_caps = device_desc7.dwDevCaps;
|
||||
|
||||
@@ -154,16 +145,16 @@ index 8a1d0a4f487..691ea7a6ef9 100644
|
||||
- device_desc7.dwDevCaps = dev_caps & ~device_list7[i].remove_caps;
|
||||
+ if (!(device_list[i].version_mask & D3D_VERSION(ddraw->d3dversion)))
|
||||
+ continue;
|
||||
|
||||
- ret = callback(device_list7[i].interface_name, device_list7[i].device_name, &device_desc7, context);
|
||||
+
|
||||
+ device_desc7.deviceGUID = *device_list[i].device_guid;
|
||||
+ device_desc7.dwDevCaps = dev_caps & ~device_list[i].remove_caps;
|
||||
+
|
||||
|
||||
- ret = callback(device_list7[i].interface_name, device_list7[i].device_name, &device_desc7, context);
|
||||
+ ret = callback(device_list[i].device_name, device_list[i].device_name, &device_desc7, context);
|
||||
if (ret != DDENUMRET_OK)
|
||||
{
|
||||
TRACE("Application cancelled the enumeration.\n");
|
||||
@@ -3726,11 +3764,21 @@ static HRESULT WINAPI d3d7_EnumDevices(IDirect3D7 *iface, LPD3DENUMDEVICESCALLBA
|
||||
@@ -3770,11 +3806,21 @@ static HRESULT WINAPI d3d7_EnumDevices(IDirect3D7 *iface, LPD3DENUMDEVICESCALLBA
|
||||
return D3D_OK;
|
||||
}
|
||||
|
||||
@@ -187,7 +178,7 @@ index 8a1d0a4f487..691ea7a6ef9 100644
|
||||
*
|
||||
* Versions 1, 2 and 3
|
||||
*
|
||||
@@ -3745,18 +3793,18 @@ static HRESULT WINAPI d3d7_EnumDevices(IDirect3D7 *iface, LPD3DENUMDEVICESCALLBA
|
||||
@@ -3789,18 +3835,18 @@ static HRESULT WINAPI d3d7_EnumDevices(IDirect3D7 *iface, LPD3DENUMDEVICESCALLBA
|
||||
*****************************************************************************/
|
||||
static HRESULT WINAPI d3d3_EnumDevices(IDirect3D3 *iface, LPD3DENUMDEVICESCALLBACK callback, void *context)
|
||||
{
|
||||
@@ -215,7 +206,7 @@ index 8a1d0a4f487..691ea7a6ef9 100644
|
||||
|
||||
TRACE("iface %p, callback %p, context %p.\n", iface, callback, context);
|
||||
|
||||
@@ -3765,52 +3813,58 @@ static HRESULT WINAPI d3d3_EnumDevices(IDirect3D3 *iface, LPD3DENUMDEVICESCALLBA
|
||||
@@ -3809,52 +3855,58 @@ static HRESULT WINAPI d3d3_EnumDevices(IDirect3D3 *iface, LPD3DENUMDEVICESCALLBA
|
||||
|
||||
wined3d_mutex_lock();
|
||||
|
||||
@@ -313,7 +304,7 @@ index 8a1d0a4f487..691ea7a6ef9 100644
|
||||
{
|
||||
TRACE("Application cancelled the enumeration.\n");
|
||||
wined3d_mutex_unlock();
|
||||
@@ -3818,29 +3872,6 @@ static HRESULT WINAPI d3d3_EnumDevices(IDirect3D3 *iface, LPD3DENUMDEVICESCALLBA
|
||||
@@ -3862,29 +3914,6 @@ static HRESULT WINAPI d3d3_EnumDevices(IDirect3D3 *iface, LPD3DENUMDEVICESCALLBA
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -15,7 +15,7 @@ index cf050cb71ed..79ef9620de9 100644
|
||||
TRACE("\n");
|
||||
}
|
||||
|
||||
+static char *dump_semantic(DWORD semantic)
|
||||
+static const char *dump_semantic(DWORD semantic)
|
||||
+{
|
||||
+ if((semantic & 0xff000000) == 0xff000000)
|
||||
+ return "Any AXIS";
|
||||
|
@@ -1,61 +0,0 @@
|
||||
From 42e7bd210fe641367962b04f5d8b3df4c09c2818 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Tue, 19 Aug 2014 22:47:51 +0200
|
||||
Subject: [PATCH 314/358] dxgi: Improve stubs for MakeWindowAssociation and
|
||||
GetWindowAssociation.
|
||||
|
||||
---
|
||||
dlls/dxgi/dxgi_private.h | 1 +
|
||||
dlls/dxgi/factory.c | 15 ++++++++++++++-
|
||||
2 files changed, 15 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/dxgi/dxgi_private.h b/dlls/dxgi/dxgi_private.h
|
||||
index 24487c3..9c5cfcc 100644
|
||||
--- a/dlls/dxgi/dxgi_private.h
|
||||
+++ b/dlls/dxgi/dxgi_private.h
|
||||
@@ -113,6 +113,7 @@ struct dxgi_factory
|
||||
struct wined3d *wined3d;
|
||||
BOOL extended;
|
||||
HWND device_window;
|
||||
+ HWND assoc_window;
|
||||
};
|
||||
|
||||
HRESULT dxgi_factory_create(REFIID riid, void **factory, BOOL extended) DECLSPEC_HIDDEN;
|
||||
diff --git a/dlls/dxgi/factory.c b/dlls/dxgi/factory.c
|
||||
index 7fc3279..d983928 100644
|
||||
--- a/dlls/dxgi/factory.c
|
||||
+++ b/dlls/dxgi/factory.c
|
||||
@@ -174,16 +174,29 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_EnumAdapters(IWineDXGIFactory *ifa
|
||||
static HRESULT STDMETHODCALLTYPE dxgi_factory_MakeWindowAssociation(IWineDXGIFactory *iface,
|
||||
HWND window, UINT flags)
|
||||
{
|
||||
+ struct dxgi_factory *factory = impl_from_IWineDXGIFactory(iface);
|
||||
+
|
||||
FIXME("iface %p, window %p, flags %#x stub!\n", iface, window, flags);
|
||||
|
||||
+ if (!window && flags)
|
||||
+ return DXGI_ERROR_INVALID_CALL;
|
||||
+
|
||||
+ factory->assoc_window = window;
|
||||
+
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE dxgi_factory_GetWindowAssociation(IWineDXGIFactory *iface, HWND *window)
|
||||
{
|
||||
+ struct dxgi_factory *factory = impl_from_IWineDXGIFactory(iface);
|
||||
+
|
||||
FIXME("iface %p, window %p stub!\n", iface, window);
|
||||
|
||||
- return E_NOTIMPL;
|
||||
+ if (!window)
|
||||
+ return DXGI_ERROR_INVALID_CALL;
|
||||
+
|
||||
+ *window = factory->assoc_window;
|
||||
+ return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE dxgi_factory_CreateSwapChain(IWineDXGIFactory *iface,
|
||||
--
|
||||
1.9.1
|
||||
|
@@ -1 +0,0 @@
|
||||
Fixes: Improve stubs for dxgi MakeWindowAssociation and GetWindowAssociation
|
@@ -1,10 +1,9 @@
|
||||
From 4df197cdb567f731bec385786ccda35499d656b4 Mon Sep 17 00:00:00 2001
|
||||
From 43baedbee4f25d88f8af30c216b888f5161e62df Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Thu, 7 Jun 2018 20:29:21 -0500
|
||||
Subject: [PATCH 03/83] ntdll: Create eventfd-based objects for semaphores.
|
||||
Subject: [PATCH] ntdll: Create eventfd-based objects for semaphores.
|
||||
|
||||
This patch break things, of course. That is fine. Its purpose is to prevent a Massive Patch Munge.
|
||||
|
||||
---
|
||||
dlls/ntdll/Makefile.in | 1 +
|
||||
dlls/ntdll/esync.c | 141 ++++++++++++++++++++++++++++++++++++++++
|
||||
@@ -17,7 +16,7 @@ This patch break things, of course. That is fine. Its purpose is to prevent a Ma
|
||||
create mode 100644 dlls/ntdll/esync.h
|
||||
|
||||
diff --git a/dlls/ntdll/Makefile.in b/dlls/ntdll/Makefile.in
|
||||
index ed4bb94e4..b75e8308a 100644
|
||||
index ed4bb94e4dc..b75e8308ac7 100644
|
||||
--- a/dlls/ntdll/Makefile.in
|
||||
+++ b/dlls/ntdll/Makefile.in
|
||||
@@ -15,6 +15,7 @@ C_SRCS = \
|
||||
@@ -30,7 +29,7 @@ index ed4bb94e4..b75e8308a 100644
|
||||
handletable.c \
|
||||
diff --git a/dlls/ntdll/esync.c b/dlls/ntdll/esync.c
|
||||
new file mode 100644
|
||||
index 000000000..da35bdf85
|
||||
index 00000000000..da35bdf854a
|
||||
--- /dev/null
|
||||
+++ b/dlls/ntdll/esync.c
|
||||
@@ -0,0 +1,141 @@
|
||||
@@ -177,7 +176,7 @@ index 000000000..da35bdf85
|
||||
+}
|
||||
diff --git a/dlls/ntdll/esync.h b/dlls/ntdll/esync.h
|
||||
new file mode 100644
|
||||
index 000000000..1a88170cf
|
||||
index 00000000000..1a88170cfc4
|
||||
--- /dev/null
|
||||
+++ b/dlls/ntdll/esync.h
|
||||
@@ -0,0 +1,32 @@
|
||||
@@ -214,10 +213,10 @@ index 000000000..1a88170cf
|
||||
+ * "server_fd_section" or something similar. */
|
||||
+extern RTL_CRITICAL_SECTION fd_cache_section;
|
||||
diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h
|
||||
index 17d87cd52..dad0996c4 100644
|
||||
index 11463146da0..a370256245c 100644
|
||||
--- a/dlls/ntdll/ntdll_misc.h
|
||||
+++ b/dlls/ntdll/ntdll_misc.h
|
||||
@@ -107,6 +107,7 @@ extern unsigned int server_queue_process_apc( HANDLE process, const apc_call_t *
|
||||
@@ -106,6 +106,7 @@ extern unsigned int server_queue_process_apc( HANDLE process, const apc_call_t *
|
||||
extern int server_remove_fd_from_cache( HANDLE handle ) DECLSPEC_HIDDEN;
|
||||
extern int server_get_unix_fd( HANDLE handle, unsigned int access, int *unix_fd,
|
||||
int *needs_close, enum server_fd_type *type, unsigned int *options ) DECLSPEC_HIDDEN;
|
||||
@@ -226,7 +225,7 @@ index 17d87cd52..dad0996c4 100644
|
||||
extern NTSTATUS alloc_object_attributes( const OBJECT_ATTRIBUTES *attr, struct object_attributes **ret,
|
||||
data_size_t *ret_len ) DECLSPEC_HIDDEN;
|
||||
diff --git a/dlls/ntdll/server.c b/dlls/ntdll/server.c
|
||||
index d2d238968..dcb355a65 100644
|
||||
index 43dfe9303bb..46f1cae3f1f 100644
|
||||
--- a/dlls/ntdll/server.c
|
||||
+++ b/dlls/ntdll/server.c
|
||||
@@ -81,6 +81,7 @@
|
||||
@@ -254,7 +253,7 @@ index d2d238968..dcb355a65 100644
|
||||
|
||||
/* atomically exchange a 64-bit value */
|
||||
static inline LONG64 interlocked_xchg64( LONG64 *dest, LONG64 val )
|
||||
@@ -773,7 +774,7 @@ void CDECL wine_server_send_fd( int fd )
|
||||
@@ -764,7 +765,7 @@ void CDECL wine_server_send_fd( int fd )
|
||||
*
|
||||
* Receive a file descriptor passed from the server.
|
||||
*/
|
||||
@@ -264,7 +263,7 @@ index d2d238968..dcb355a65 100644
|
||||
struct iovec vec;
|
||||
struct msghdr msghdr;
|
||||
diff --git a/dlls/ntdll/sync.c b/dlls/ntdll/sync.c
|
||||
index b74bebf08..c259267fb 100644
|
||||
index 8974c7ed907..3939ce1ba78 100644
|
||||
--- a/dlls/ntdll/sync.c
|
||||
+++ b/dlls/ntdll/sync.c
|
||||
@@ -59,7 +59,9 @@
|
||||
@@ -275,9 +274,9 @@ index b74bebf08..c259267fb 100644
|
||||
#include "ntdll_misc.h"
|
||||
+#include "esync.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(ntdll);
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(sync);
|
||||
|
||||
@@ -248,6 +250,9 @@ NTSTATUS WINAPI NtCreateSemaphore( OUT PHANDLE SemaphoreHandle,
|
||||
@@ -249,6 +251,9 @@ NTSTATUS WINAPI NtCreateSemaphore( OUT PHANDLE SemaphoreHandle,
|
||||
if (MaximumCount <= 0 || InitialCount < 0 || InitialCount > MaximumCount)
|
||||
return STATUS_INVALID_PARAMETER;
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From f3bcb0b64f7960dad656347dadb56be9b3afe262 Mon Sep 17 00:00:00 2001
|
||||
From e13e9f7a5403d5aa7598bd788d9566ce445d3d67 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Fri, 8 Jun 2018 22:04:29 -0500
|
||||
Subject: [PATCH] server: Create eventfd file descriptors for thread objects.
|
||||
@@ -9,7 +9,7 @@ Subject: [PATCH] server: Create eventfd file descriptors for thread objects.
|
||||
2 files changed, 16 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/server/thread.c b/server/thread.c
|
||||
index 85349475c..35bddeeaa 100644
|
||||
index a7dcf1088af..1bd09ff4810 100644
|
||||
--- a/server/thread.c
|
||||
+++ b/server/thread.c
|
||||
@@ -133,6 +133,7 @@ static const struct object_ops thread_apc_ops =
|
||||
@@ -36,8 +36,8 @@ index 85349475c..35bddeeaa 100644
|
||||
+ thread->esync_fd = -1;
|
||||
thread->debug_ctx = NULL;
|
||||
thread->debug_event = NULL;
|
||||
thread->debug_break = 0;
|
||||
@@ -294,6 +296,9 @@ struct thread *create_thread( int fd, struct process *process, const struct secu
|
||||
thread->system_regs = 0;
|
||||
@@ -293,6 +295,9 @@ struct thread *create_thread( int fd, struct process *process, const struct secu
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ index 85349475c..35bddeeaa 100644
|
||||
set_fd_events( thread->request_fd, POLLIN ); /* start listening to events */
|
||||
add_process_thread( thread->process, thread );
|
||||
return thread;
|
||||
@@ -372,6 +377,9 @@ static void destroy_thread( struct object *obj )
|
||||
@@ -371,6 +376,9 @@ static void destroy_thread( struct object *obj )
|
||||
if (thread->exit_poll) remove_timeout_user( thread->exit_poll );
|
||||
if (thread->id) free_ptid( thread->id );
|
||||
if (thread->token) release_object( thread->token );
|
||||
@@ -57,7 +57,7 @@ index 85349475c..35bddeeaa 100644
|
||||
}
|
||||
|
||||
/* dump a thread on stdout for debugging purposes */
|
||||
@@ -397,6 +405,12 @@ static int thread_signaled( struct object *obj, struct wait_queue_entry *entry )
|
||||
@@ -396,6 +404,12 @@ static int thread_signaled( struct object *obj, struct wait_queue_entry *entry )
|
||||
return mythread->state == TERMINATED && !mythread->exit_poll;
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ index 85349475c..35bddeeaa 100644
|
||||
{
|
||||
if (access & GENERIC_READ) access |= STANDARD_RIGHTS_READ | THREAD_QUERY_INFORMATION | THREAD_GET_CONTEXT;
|
||||
diff --git a/server/thread.h b/server/thread.h
|
||||
index fa4ced546..46064cb4a 100644
|
||||
index d2b511145b9..29bf6b51359 100644
|
||||
--- a/server/thread.h
|
||||
+++ b/server/thread.h
|
||||
@@ -54,6 +54,7 @@ struct thread
|
||||
@@ -81,7 +81,7 @@ index fa4ced546..46064cb4a 100644
|
||||
+ int esync_fd; /* esync file descriptor (signalled on exit) */
|
||||
struct debug_ctx *debug_ctx; /* debugger context if this thread is a debugger */
|
||||
struct debug_event *debug_event; /* debug event being sent to debugger */
|
||||
int debug_break; /* debug breakpoint pending? */
|
||||
unsigned int system_regs; /* which system regs have been set */
|
||||
--
|
||||
2.21.0
|
||||
2.20.1
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 216028748c99e8ea03c913b7885e2e97c6c0fbca Mon Sep 17 00:00:00 2001
|
||||
From 241237ce6d96ac33915e002518b550d41baaf413 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Fri, 15 Jun 2018 14:12:22 -0500
|
||||
Subject: [PATCH] server, ntdll: Implement alertable waits.
|
||||
@@ -16,7 +16,7 @@ We do this quite simply by waiting on an extra eventfd descriptor, which the ser
|
||||
8 files changed, 121 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/esync.c b/dlls/ntdll/esync.c
|
||||
index 119a36f36..8a41f6961 100644
|
||||
index 119a36f3611..8a41f6961f9 100644
|
||||
--- a/dlls/ntdll/esync.c
|
||||
+++ b/dlls/ntdll/esync.c
|
||||
@@ -684,19 +684,43 @@ static int do_poll( struct pollfd *fds, nfds_t nfds, ULONGLONG *end )
|
||||
@@ -196,10 +196,10 @@ index 119a36f36..8a41f6961 100644
|
||||
|
||||
NTSTATUS esync_signal_and_wait( HANDLE signal, HANDLE wait, BOOLEAN alertable,
|
||||
diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h
|
||||
index 951c9b7f9..5574e24fd 100644
|
||||
index 31714f90516..009dd33ede0 100644
|
||||
--- a/dlls/ntdll/ntdll_misc.h
|
||||
+++ b/dlls/ntdll/ntdll_misc.h
|
||||
@@ -241,6 +241,7 @@ struct ntdll_thread_data
|
||||
@@ -239,6 +239,7 @@ struct ntdll_thread_data
|
||||
{
|
||||
struct debug_info *debug_info; /* info for debugstr functions */
|
||||
int esync_queue_fd;/* fd to wait on for driver events */
|
||||
@@ -208,10 +208,10 @@ index 951c9b7f9..5574e24fd 100644
|
||||
int request_fd; /* fd for sending server requests */
|
||||
int reply_fd; /* fd for receiving server replies */
|
||||
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
|
||||
index 1d55162a6..dd553a864 100644
|
||||
index 95c175aa7fe..711505242c0 100644
|
||||
--- a/dlls/ntdll/thread.c
|
||||
+++ b/dlls/ntdll/thread.c
|
||||
@@ -319,6 +319,7 @@ void thread_init(void)
|
||||
@@ -328,6 +328,7 @@ void thread_init(void)
|
||||
thread_data->wait_fd[0] = -1;
|
||||
thread_data->wait_fd[1] = -1;
|
||||
thread_data->esync_queue_fd = -1;
|
||||
@@ -219,7 +219,7 @@ index 1d55162a6..dd553a864 100644
|
||||
|
||||
signal_init_thread( teb );
|
||||
virtual_init_threading();
|
||||
@@ -691,6 +692,7 @@ NTSTATUS WINAPI NtCreateThreadEx( HANDLE *handle_ptr, ACCESS_MASK access, OBJECT
|
||||
@@ -706,6 +707,7 @@ NTSTATUS WINAPI NtCreateThreadEx( HANDLE *handle_ptr, ACCESS_MASK access, OBJECT
|
||||
thread_data->wait_fd[1] = -1;
|
||||
thread_data->start_stack = (char *)teb->Tib.StackBase;
|
||||
thread_data->esync_queue_fd = -1;
|
||||
@@ -228,7 +228,7 @@ index 1d55162a6..dd553a864 100644
|
||||
pthread_attr_init( &pthread_attr );
|
||||
pthread_attr_setstack( &pthread_attr, teb->DeallocationStack,
|
||||
diff --git a/server/esync.c b/server/esync.c
|
||||
index 5ef4dd282..4fb42e6f9 100644
|
||||
index 5ef4dd282ee..4fb42e6f9d2 100644
|
||||
--- a/server/esync.c
|
||||
+++ b/server/esync.c
|
||||
@@ -247,19 +247,25 @@ int esync_create_fd( int initval, int flags )
|
||||
@@ -272,7 +272,7 @@ index 5ef4dd282..4fb42e6f9 100644
|
||||
+ send_client_fd( current->process, current->esync_apc_fd, current->id );
|
||||
+}
|
||||
diff --git a/server/esync.h b/server/esync.h
|
||||
index aeb58c546..cea025d93 100644
|
||||
index aeb58c5469c..cea025d9308 100644
|
||||
--- a/server/esync.h
|
||||
+++ b/server/esync.h
|
||||
@@ -21,6 +21,7 @@
|
||||
@@ -284,10 +284,10 @@ index aeb58c546..cea025d93 100644
|
||||
void esync_clear( int fd );
|
||||
|
||||
diff --git a/server/protocol.def b/server/protocol.def
|
||||
index 4002ee642..ce165b71b 100644
|
||||
index 65a6696e38f..d577edc0e02 100644
|
||||
--- a/server/protocol.def
|
||||
+++ b/server/protocol.def
|
||||
@@ -4032,6 +4032,11 @@ struct handle_info
|
||||
@@ -4054,6 +4054,11 @@ struct handle_info
|
||||
unsigned int shm_idx; /* this object's index into the shm section */
|
||||
@END
|
||||
|
||||
@@ -300,7 +300,7 @@ index 4002ee642..ce165b71b 100644
|
||||
{
|
||||
ESYNC_SEMAPHORE = 1,
|
||||
diff --git a/server/thread.c b/server/thread.c
|
||||
index 7c8ff1d5d..0e02630b9 100644
|
||||
index 9a014b15459..4b4e342243c 100644
|
||||
--- a/server/thread.c
|
||||
+++ b/server/thread.c
|
||||
@@ -188,6 +188,7 @@ static inline void init_thread_structure( struct thread *thread )
|
||||
@@ -310,8 +310,8 @@ index 7c8ff1d5d..0e02630b9 100644
|
||||
+ thread->esync_apc_fd = -1;
|
||||
thread->debug_ctx = NULL;
|
||||
thread->debug_event = NULL;
|
||||
thread->debug_break = 0;
|
||||
@@ -297,7 +298,10 @@ struct thread *create_thread( int fd, struct process *process, const struct secu
|
||||
thread->system_regs = 0;
|
||||
@@ -296,7 +297,10 @@ struct thread *create_thread( int fd, struct process *process, const struct secu
|
||||
}
|
||||
|
||||
if (do_esync())
|
||||
@@ -322,7 +322,7 @@ index 7c8ff1d5d..0e02630b9 100644
|
||||
|
||||
set_fd_events( thread->request_fd, POLLIN ); /* start listening to events */
|
||||
add_process_thread( thread->process, thread );
|
||||
@@ -1052,8 +1056,13 @@ static int queue_apc( struct process *process, struct thread *thread, struct thr
|
||||
@@ -1051,8 +1055,13 @@ static int queue_apc( struct process *process, struct thread *thread, struct thr
|
||||
grab_object( apc );
|
||||
list_add_tail( queue, &apc->entry );
|
||||
if (!list_prev( queue, &apc->entry )) /* first one */
|
||||
@@ -336,7 +336,7 @@ index 7c8ff1d5d..0e02630b9 100644
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -1100,6 +1109,10 @@ static struct thread_apc *thread_dequeue_apc( struct thread *thread, int system_
|
||||
@@ -1099,6 +1108,10 @@ static struct thread_apc *thread_dequeue_apc( struct thread *thread, int system_
|
||||
apc = LIST_ENTRY( ptr, struct thread_apc, entry );
|
||||
list_remove( ptr );
|
||||
}
|
||||
@@ -348,7 +348,7 @@ index 7c8ff1d5d..0e02630b9 100644
|
||||
}
|
||||
|
||||
diff --git a/server/thread.h b/server/thread.h
|
||||
index 46064cb4a..36ccb9207 100644
|
||||
index 29bf6b51359..620f8aa9c81 100644
|
||||
--- a/server/thread.h
|
||||
+++ b/server/thread.h
|
||||
@@ -55,6 +55,7 @@ struct thread
|
||||
@@ -358,7 +358,7 @@ index 46064cb4a..36ccb9207 100644
|
||||
+ int esync_apc_fd; /* esync apc fd (signalled when APCs are present) */
|
||||
struct debug_ctx *debug_ctx; /* debugger context if this thread is a debugger */
|
||||
struct debug_event *debug_event; /* debug event being sent to debugger */
|
||||
int debug_break; /* debug breakpoint pending? */
|
||||
unsigned int system_regs; /* which system regs have been set */
|
||||
--
|
||||
2.21.0
|
||||
2.20.1
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From e84ed4d3b01ef570a0dc235822c3b4d159c78cb1 Mon Sep 17 00:00:00 2001
|
||||
From f9ae11dca3f89a8b56315f759d1c6b1ec60bd71f Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sat, 15 Aug 2015 07:41:17 +0200
|
||||
Subject: [PATCH] gdi32: Perform lazy initialization of fonts to improve
|
||||
@@ -10,7 +10,7 @@ Subject: [PATCH] gdi32: Perform lazy initialization of fonts to improve
|
||||
2 files changed, 37 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/dlls/gdi32/dc.c b/dlls/gdi32/dc.c
|
||||
index 8ee8a52d..208c2202 100644
|
||||
index c24b96e2750..ecc095dffec 100644
|
||||
--- a/dlls/gdi32/dc.c
|
||||
+++ b/dlls/gdi32/dc.c
|
||||
@@ -148,11 +148,9 @@ DC *alloc_dc_ptr( WORD magic )
|
||||
@@ -29,10 +29,10 @@ index 8ee8a52d..208c2202 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c
|
||||
index 098faff3..fbdbf858 100644
|
||||
index 1162ea790d5..6a7f2d13c0d 100644
|
||||
--- a/dlls/gdi32/freetype.c
|
||||
+++ b/dlls/gdi32/freetype.c
|
||||
@@ -110,6 +110,9 @@
|
||||
@@ -109,6 +109,9 @@
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(font);
|
||||
|
||||
@@ -42,7 +42,7 @@ index 098faff3..fbdbf858 100644
|
||||
#ifdef HAVE_FREETYPE
|
||||
|
||||
#ifndef HAVE_FT_TRUETYPEENGINETYPE
|
||||
@@ -3266,6 +3269,7 @@ INT WineEngAddFontResourceEx(LPCWSTR file, DWORD flags, PVOID pdv)
|
||||
@@ -3263,6 +3266,7 @@ INT WineEngAddFontResourceEx(LPCWSTR file, DWORD flags, PVOID pdv)
|
||||
{
|
||||
INT ret = 0;
|
||||
|
||||
@@ -50,7 +50,7 @@ index 098faff3..fbdbf858 100644
|
||||
GDI_CheckNotLock();
|
||||
|
||||
if (ft_handle) /* do it only if we have freetype up and running */
|
||||
@@ -3308,6 +3312,7 @@ INT WineEngAddFontResourceEx(LPCWSTR file, DWORD flags, PVOID pdv)
|
||||
@@ -3305,6 +3309,7 @@ INT WineEngAddFontResourceEx(LPCWSTR file, DWORD flags, PVOID pdv)
|
||||
*/
|
||||
HANDLE WineEngAddFontMemResourceEx(PVOID pbFont, DWORD cbFont, PVOID pdv, DWORD *pcFonts)
|
||||
{
|
||||
@@ -58,7 +58,7 @@ index 098faff3..fbdbf858 100644
|
||||
GDI_CheckNotLock();
|
||||
|
||||
if (ft_handle) /* do it only if we have freetype up and running */
|
||||
@@ -3346,6 +3351,7 @@ BOOL WineEngRemoveFontResourceEx(LPCWSTR file, DWORD flags, PVOID pdv)
|
||||
@@ -3343,6 +3348,7 @@ BOOL WineEngRemoveFontResourceEx(LPCWSTR file, DWORD flags, PVOID pdv)
|
||||
{
|
||||
INT ret = 0;
|
||||
|
||||
@@ -66,7 +66,7 @@ index 098faff3..fbdbf858 100644
|
||||
GDI_CheckNotLock();
|
||||
|
||||
if (ft_handle) /* do it only if we have freetype up and running */
|
||||
@@ -3667,10 +3673,13 @@ static BOOL create_fot( const WCHAR *resource, const WCHAR *font_file, const str
|
||||
@@ -3664,10 +3670,13 @@ static BOOL create_fot( const WCHAR *resource, const WCHAR *font_file, const str
|
||||
BOOL WineEngCreateScalableFontResource( DWORD hidden, LPCWSTR resource,
|
||||
LPCWSTR font_file, LPCWSTR font_path )
|
||||
{
|
||||
@@ -81,7 +81,7 @@ index 098faff3..fbdbf858 100644
|
||||
if (!unix_name || !get_fontdir( unix_name, &fontdir ))
|
||||
SetLastError( ERROR_INVALID_PARAMETER );
|
||||
else
|
||||
@@ -4184,8 +4193,6 @@ static BOOL init_freetype(void)
|
||||
@@ -4181,8 +4190,6 @@ static BOOL init_freetype(void)
|
||||
FT_UInt interpreter_version = 35;
|
||||
pFT_Property_Set( library, "truetype", "interpreter-version", &interpreter_version );
|
||||
}
|
||||
@@ -90,7 +90,7 @@ index 098faff3..fbdbf858 100644
|
||||
return TRUE;
|
||||
|
||||
sym_not_found:
|
||||
@@ -4371,21 +4378,13 @@ static void reorder_font_list(void)
|
||||
@@ -4368,21 +4375,13 @@ static void reorder_font_list(void)
|
||||
default_sans = set_default( default_sans_list );
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ index 098faff3..fbdbf858 100644
|
||||
|
||||
#ifdef SONAME_LIBFONTCONFIG
|
||||
init_fontconfig();
|
||||
@@ -4411,7 +4410,7 @@ BOOL WineEngInit(void)
|
||||
@@ -4408,7 +4407,7 @@ BOOL WineEngInit(void)
|
||||
if((font_mutex = CreateMutexW(NULL, FALSE, font_mutex_nameW)) == NULL)
|
||||
{
|
||||
ERR("Failed to create font mutex\n");
|
||||
@@ -123,7 +123,7 @@ index 098faff3..fbdbf858 100644
|
||||
}
|
||||
WaitForSingleObject(font_mutex, INFINITE);
|
||||
|
||||
@@ -4438,6 +4437,21 @@ BOOL WineEngInit(void)
|
||||
@@ -4435,6 +4434,21 @@ BOOL WineEngInit(void)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -145,9 +145,9 @@ index 098faff3..fbdbf858 100644
|
||||
/* Some fonts have large usWinDescent values, as a result of storing signed short
|
||||
in unsigned field. That's probably caused by sTypoDescent vs usWinDescent confusion in
|
||||
some font generation tools. */
|
||||
@@ -5180,8 +5194,12 @@ static BOOL select_charmap(FT_Face ft_face, FT_Encoding encoding)
|
||||
static BOOL freetype_CreateDC( PHYSDEV *dev, LPCWSTR driver, LPCWSTR device,
|
||||
LPCWSTR output, const DEVMODEW *devmode )
|
||||
@@ -5177,8 +5191,12 @@ static BOOL select_charmap(FT_Face ft_face, FT_Encoding encoding)
|
||||
static BOOL CDECL freetype_CreateDC( PHYSDEV *dev, LPCWSTR driver, LPCWSTR device,
|
||||
LPCWSTR output, const DEVMODEW *devmode )
|
||||
{
|
||||
- struct freetype_physdev *physdev = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*physdev) );
|
||||
+ struct freetype_physdev *physdev;
|
||||
@@ -159,7 +159,7 @@ index 098faff3..fbdbf858 100644
|
||||
if (!physdev) return FALSE;
|
||||
push_dc_driver( dev, &physdev->dev, &freetype_funcs );
|
||||
return TRUE;
|
||||
@@ -8718,6 +8736,7 @@ static BOOL freetype_FontIsLinked( PHYSDEV dev )
|
||||
@@ -8749,6 +8767,7 @@ static BOOL CDECL freetype_FontIsLinked( PHYSDEV dev )
|
||||
*/
|
||||
BOOL WINAPI GetRasterizerCaps( LPRASTERIZER_STATUS lprs, UINT cbNumBytes)
|
||||
{
|
||||
|
@@ -1,77 +0,0 @@
|
||||
From b4797a84f8cb931433b055c55030b0eb86320789 Mon Sep 17 00:00:00 2001
|
||||
From: Ken Thomases <ken@codeweavers.com>
|
||||
Date: Sat, 18 Oct 2014 22:25:25 +0200
|
||||
Subject: gdi32: Also accept "\\.\DISPLAY<n>" devices names with <n> other than
|
||||
1 as display devices.
|
||||
|
||||
---
|
||||
dlls/gdi32/driver.c | 32 ++++++++++++++++++++++++++++----
|
||||
1 file changed, 28 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/gdi32/driver.c b/dlls/gdi32/driver.c
|
||||
index 4529562..9e4f6f4 100644
|
||||
--- a/dlls/gdi32/driver.c
|
||||
+++ b/dlls/gdi32/driver.c
|
||||
@@ -109,6 +109,32 @@ static const struct gdi_dc_funcs *get_display_driver(void)
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
+ * is_display_device
|
||||
+ */
|
||||
+static BOOL is_display_device( LPCWSTR name )
|
||||
+{
|
||||
+ static const WCHAR display_deviceW[] = {'\\','\\','.','\\','D','I','S','P','L','A','Y'};
|
||||
+ const WCHAR *p = name;
|
||||
+
|
||||
+ if (strncmpiW( name, display_deviceW, sizeof(display_deviceW) / sizeof(WCHAR) ))
|
||||
+ return FALSE;
|
||||
+
|
||||
+ p += sizeof(display_deviceW) / sizeof(WCHAR);
|
||||
+
|
||||
+ if (!isdigitW( *p++ ))
|
||||
+ return FALSE;
|
||||
+
|
||||
+ for (; *p; p++)
|
||||
+ {
|
||||
+ if (!isdigitW( *p ))
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+
|
||||
+ return TRUE;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+/**********************************************************************
|
||||
* DRIVER_load_driver
|
||||
*/
|
||||
const struct gdi_dc_funcs *DRIVER_load_driver( LPCWSTR name )
|
||||
@@ -116,10 +142,9 @@ const struct gdi_dc_funcs *DRIVER_load_driver( LPCWSTR name )
|
||||
HMODULE module;
|
||||
struct graphics_driver *driver, *new_driver;
|
||||
static const WCHAR displayW[] = { 'd','i','s','p','l','a','y',0 };
|
||||
- static const WCHAR display1W[] = {'\\','\\','.','\\','D','I','S','P','L','A','Y','1',0};
|
||||
|
||||
/* display driver is a special case */
|
||||
- if (!strcmpiW( name, displayW ) || !strcmpiW( name, display1W )) return get_display_driver();
|
||||
+ if (!strcmpiW( name, displayW ) || is_display_device( name )) return get_display_driver();
|
||||
|
||||
if ((module = GetModuleHandleW( name )))
|
||||
{
|
||||
@@ -774,13 +799,12 @@ BOOL DRIVER_GetDriverName( LPCWSTR device, LPWSTR driver, DWORD size )
|
||||
{
|
||||
static const WCHAR displayW[] = { 'd','i','s','p','l','a','y',0 };
|
||||
static const WCHAR devicesW[] = { 'd','e','v','i','c','e','s',0 };
|
||||
- static const WCHAR display1W[] = {'\\','\\','.','\\','D','I','S','P','L','A','Y','1',0};
|
||||
static const WCHAR empty_strW[] = { 0 };
|
||||
WCHAR *p;
|
||||
|
||||
/* display is a special case */
|
||||
if (!strcmpiW( device, displayW ) ||
|
||||
- !strcmpiW( device, display1W ))
|
||||
+ is_display_device( device ))
|
||||
{
|
||||
lstrcpynW( driver, displayW, size );
|
||||
return TRUE;
|
||||
--
|
||||
1.9.1
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user