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
74 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
31c73c6b53 | ||
|
c205df71c7 | ||
|
010c308abd | ||
|
924665da6f | ||
|
523d4ac996 | ||
|
67035d62f7 | ||
|
35a5f7db93 | ||
|
ca09e8918c | ||
|
49b441e0df | ||
|
f901156486 | ||
|
c7780d90cb | ||
|
73f58bac41 | ||
|
ad822b6405 | ||
|
9917fb4559 | ||
|
3f06c18b19 | ||
|
2474aff2c1 | ||
|
c9b8050f9d | ||
|
2394b08005 | ||
|
276ed085b7 | ||
|
b5010c55e8 | ||
|
391055dbe1 | ||
|
7ebc640edb | ||
|
4413770af1 | ||
|
aad0b50e62 | ||
|
9fd7972c2b | ||
|
a67dca35a1 | ||
|
5d7a86d054 | ||
|
a12c030bd9 | ||
|
a0735f083d | ||
|
460094e600 | ||
|
c95aae1049 | ||
|
394c51bd20 | ||
|
0bdc57245a | ||
|
9092f3922a | ||
|
e298cdfaf9 | ||
|
b95b9109b8 | ||
|
8d19b3fc4b | ||
|
aa2ec8b32c | ||
|
944b464511 | ||
|
1b15ab1bdc | ||
|
6e530333e6 | ||
|
5ed9211eab | ||
|
e0bf5ac738 | ||
|
accf189516 | ||
|
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
|
||||
|
||||
|
2
patches/Compiler_Warnings/definition
Normal file
2
patches/Compiler_Warnings/definition
Normal file
@@ -0,0 +1,2 @@
|
||||
Fixes: Fixes compile warnings.
|
||||
Depends: mailing-list-patches
|
@@ -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,31 +0,0 @@
|
||||
From be28c746d013c16fa6c2e50f5f9debc45d39d81b Mon Sep 17 00:00:00 2001
|
||||
From: Qian Hong <qhong@codeweavers.com>
|
||||
Date: Tue, 7 Apr 2015 13:18:31 +0800
|
||||
Subject: advapi32: Initialize buffer length to zero in LsaLookupSids to
|
||||
prevent crash. (try 2)
|
||||
|
||||
Superseded 110588-110594
|
||||
|
||||
Try 2:
|
||||
- Use RtlInitUnicodeStringEx to simplify code when possible. Same for
|
||||
other patches in this series. (Thanks Nikolay)
|
||||
---
|
||||
dlls/advapi32/lsa.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/advapi32/lsa.c b/dlls/advapi32/lsa.c
|
||||
index 2a8b791..69c29c5 100644
|
||||
--- a/dlls/advapi32/lsa.c
|
||||
+++ b/dlls/advapi32/lsa.c
|
||||
@@ -502,7 +502,7 @@ NTSTATUS WINAPI LsaLookupSids(
|
||||
{
|
||||
(*Names)[i].Use = SidTypeUnknown;
|
||||
(*Names)[i].DomainIndex = -1;
|
||||
- (*Names)[i].Name.Buffer = NULL;
|
||||
+ RtlInitUnicodeStringEx(&(*Names)[i].Name, NULL);
|
||||
|
||||
memset(&(*ReferencedDomains)->Domains[i], 0, sizeof(LSA_TRUST_INFORMATION));
|
||||
|
||||
--
|
||||
2.3.5
|
||||
|
@@ -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,4 +1,4 @@
|
||||
From 0616176a3276be4ae49dc86c7d96b11240afca78 Mon Sep 17 00:00:00 2001
|
||||
From 5bf0baa79c46ec44dfd5e1340e96ff9289bc37f8 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sun, 6 Aug 2017 03:15:34 +0200
|
||||
Subject: [PATCH] programs/runas: Basic implementation for starting processes
|
||||
@@ -7,9 +7,9 @@ Subject: [PATCH] programs/runas: Basic implementation for starting processes
|
||||
---
|
||||
configure.ac | 1 +
|
||||
programs/runas/Makefile.in | 8 ++
|
||||
programs/runas/runas.c | 214 +++++++++++++++++++++++++++++++++++++++++++++
|
||||
programs/runas/runas.h | 26 ++++++
|
||||
programs/runas/runas.rc | 39 +++++++++
|
||||
programs/runas/runas.c | 214 +++++++++++++++++++++++++++++++++++++
|
||||
programs/runas/runas.h | 26 +++++
|
||||
programs/runas/runas.rc | 39 +++++++
|
||||
5 files changed, 288 insertions(+)
|
||||
create mode 100644 programs/runas/Makefile.in
|
||||
create mode 100644 programs/runas/runas.c
|
||||
@@ -17,10 +17,10 @@ Subject: [PATCH] programs/runas: Basic implementation for starting processes
|
||||
create mode 100644 programs/runas/runas.rc
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index b9ef668..404ab7a 100644
|
||||
index 499c4f37ca..6f12614af1 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -3879,6 +3879,7 @@ WINE_CONFIG_MAKEFILE(programs/regedit/tests)
|
||||
@@ -3891,6 +3891,7 @@ WINE_CONFIG_MAKEFILE(programs/regedit/tests)
|
||||
WINE_CONFIG_MAKEFILE(programs/regsvcs)
|
||||
WINE_CONFIG_MAKEFILE(programs/regsvr32)
|
||||
WINE_CONFIG_MAKEFILE(programs/rpcss)
|
||||
@@ -30,12 +30,12 @@ index b9ef668..404ab7a 100644
|
||||
WINE_CONFIG_MAKEFILE(programs/sc)
|
||||
diff --git a/programs/runas/Makefile.in b/programs/runas/Makefile.in
|
||||
new file mode 100644
|
||||
index 0000000..be9434b
|
||||
index 0000000000..33aa00ab03
|
||||
--- /dev/null
|
||||
+++ b/programs/runas/Makefile.in
|
||||
@@ -0,0 +1,8 @@
|
||||
+MODULE = runas.exe
|
||||
+APPMODE = -mconsole -municode
|
||||
+APPMODE = -mconsole -municode -mno-cygwin
|
||||
+IMPORTS = advapi32 user32
|
||||
+
|
||||
+C_SRCS = \
|
||||
@@ -44,7 +44,7 @@ index 0000000..be9434b
|
||||
+RC_SRCS = runas.rc
|
||||
diff --git a/programs/runas/runas.c b/programs/runas/runas.c
|
||||
new file mode 100644
|
||||
index 0000000..8e96aff
|
||||
index 0000000000..412755afa0
|
||||
--- /dev/null
|
||||
+++ b/programs/runas/runas.c
|
||||
@@ -0,0 +1,214 @@
|
||||
@@ -69,7 +69,7 @@ index 0000000..8e96aff
|
||||
+ */
|
||||
+
|
||||
+#include <windows.h>
|
||||
+#include <wine/unicode.h>
|
||||
+#include <wchar.h>
|
||||
+#include <wine/debug.h>
|
||||
+
|
||||
+#include "runas.h"
|
||||
@@ -153,10 +153,10 @@ index 0000000..8e96aff
|
||||
+
|
||||
+static WCHAR *starts_with(WCHAR *str, const WCHAR *start)
|
||||
+{
|
||||
+ DWORD start_len = strlenW(start);
|
||||
+ if (strlenW(str) < start_len)
|
||||
+ DWORD start_len = lstrlenW(start);
|
||||
+ if (lstrlenW(str) < start_len)
|
||||
+ return NULL;
|
||||
+ if (strncmpW(str, start, start_len))
|
||||
+ if (wcsncmp(str, start, start_len))
|
||||
+ return NULL;
|
||||
+ return str + start_len;
|
||||
+}
|
||||
@@ -176,8 +176,8 @@ index 0000000..8e96aff
|
||||
+ WCHAR *arg;
|
||||
+
|
||||
+ if ((arg = starts_with(argv[i], trustlevelW)))
|
||||
+ cmd->trustlevel = strtoulW(arg, NULL, 0);
|
||||
+ else if (!strcmpW(argv[i], showtrustlevelsW))
|
||||
+ cmd->trustlevel = wcstoul(arg, NULL, 0);
|
||||
+ else if (!lstrcmpW(argv[i], showtrustlevelsW))
|
||||
+ show_trustlevels();
|
||||
+ else
|
||||
+ WINE_FIXME("Ignoring parameter %s\n", wine_dbgstr_w(argv[i]));
|
||||
@@ -264,7 +264,7 @@ index 0000000..8e96aff
|
||||
+}
|
||||
diff --git a/programs/runas/runas.h b/programs/runas/runas.h
|
||||
new file mode 100644
|
||||
index 0000000..40599a3
|
||||
index 0000000000..40599a3b33
|
||||
--- /dev/null
|
||||
+++ b/programs/runas/runas.h
|
||||
@@ -0,0 +1,26 @@
|
||||
@@ -296,7 +296,7 @@ index 0000000..40599a3
|
||||
+#define STRING_START_ERROR 104
|
||||
diff --git a/programs/runas/runas.rc b/programs/runas/runas.rc
|
||||
new file mode 100644
|
||||
index 0000000..f9297a4
|
||||
index 0000000000..f9297a4479
|
||||
--- /dev/null
|
||||
+++ b/programs/runas/runas.rc
|
||||
@@ -0,0 +1,39 @@
|
||||
@@ -340,5 +340,5 @@ index 0000000..f9297a4
|
||||
+ %2!u!: %3\n"
|
||||
+}
|
||||
--
|
||||
2.7.4
|
||||
2.23.0.rc1
|
||||
|
||||
|
@@ -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
|
||||
|
||||
|
@@ -0,0 +1,203 @@
|
||||
From 25b5e818272cf6fc52a8707c80b9ade3a5ca5df5 Mon Sep 17 00:00:00 2001
|
||||
From: Jason Edmeades <us@edmeades.me.uk>
|
||||
Date: Tue, 16 Jul 2019 13:49:18 +1000
|
||||
Subject: [PATCH 1/2] cmd: Support for launching programs based on file
|
||||
association
|
||||
|
||||
cmd already handles exe, cmd, bat etc but if you run a file with another extension,
|
||||
then use the associations set in the registry (for example via ftype / assoc) to
|
||||
launch a program. This enables you to run test.txt and notepad to pop up, or
|
||||
fred.msi for msiexec to be launched.
|
||||
|
||||
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=18154
|
||||
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=36646
|
||||
---
|
||||
programs/cmd/wcmdmain.c | 140 +++++++++++++++++++++++++++++-----------
|
||||
1 file changed, 104 insertions(+), 36 deletions(-)
|
||||
|
||||
diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c
|
||||
index 29e498a48d..2a9e4c75ee 100644
|
||||
--- a/programs/cmd/wcmdmain.c
|
||||
+++ b/programs/cmd/wcmdmain.c
|
||||
@@ -1142,8 +1142,10 @@ void WCMD_run_program (WCHAR *command, BOOL called)
|
||||
|
||||
/* 1. If extension supplied, see if that file exists */
|
||||
if (extensionsupplied) {
|
||||
- if (GetFileAttributesW(thisDir) != INVALID_FILE_ATTRIBUTES) {
|
||||
+ DWORD attribs = GetFileAttributesW(thisDir);
|
||||
+ if (attribs != INVALID_FILE_ATTRIBUTES && !(attribs&FILE_ATTRIBUTE_DIRECTORY)) {
|
||||
found = TRUE;
|
||||
+ WINE_TRACE("Found as file with extension as '%s'\n", wine_dbgstr_w(thisDir));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1174,6 +1176,7 @@ void WCMD_run_program (WCHAR *command, BOOL called)
|
||||
}
|
||||
|
||||
if (GetFileAttributesW(thisDir) != INVALID_FILE_ATTRIBUTES) {
|
||||
+ WINE_TRACE("Found via search and pathext as '%s'\n", wine_dbgstr_w(thisDir));
|
||||
found = TRUE;
|
||||
thisExt = NULL;
|
||||
}
|
||||
@@ -1191,58 +1194,123 @@ void WCMD_run_program (WCHAR *command, BOOL called)
|
||||
WCHAR *ext = wcsrchr( thisDir, '.' );
|
||||
static const WCHAR batExt[] = {'.','b','a','t','\0'};
|
||||
static const WCHAR cmdExt[] = {'.','c','m','d','\0'};
|
||||
+ static const WCHAR exeExt[] = {'.','e','x','e','\0'};
|
||||
+ static const WCHAR comExt[] = {'.','c','o','m','\0'};
|
||||
|
||||
WINE_TRACE("Found as %s\n", wine_dbgstr_w(thisDir));
|
||||
|
||||
/* Special case BAT and CMD */
|
||||
if (ext && (!wcsicmp(ext, batExt) || !wcsicmp(ext, cmdExt))) {
|
||||
BOOL oldinteractive = interactive;
|
||||
+ WINE_TRACE("Calling batch program\n");
|
||||
interactive = FALSE;
|
||||
WCMD_batch (thisDir, command, called, NULL, INVALID_HANDLE_VALUE);
|
||||
interactive = oldinteractive;
|
||||
+ WINE_TRACE("Back from call to batch program\n");
|
||||
return;
|
||||
- } else {
|
||||
+ }
|
||||
|
||||
- /* thisDir contains the file to be launched, but with what?
|
||||
- eg. a.exe will require a.exe to be launched, a.html may be iexplore */
|
||||
- hinst = FindExecutableW (thisDir, NULL, temp);
|
||||
- if ((INT_PTR)hinst < 32)
|
||||
- console = 0;
|
||||
- else
|
||||
- console = SHGetFileInfoW(temp, 0, &psfi, sizeof(psfi), SHGFI_EXETYPE);
|
||||
-
|
||||
- ZeroMemory (&st, sizeof(STARTUPINFOW));
|
||||
- st.cb = sizeof(STARTUPINFOW);
|
||||
- init_msvcrt_io_block(&st);
|
||||
-
|
||||
- /* Launch the process and if a CUI wait on it to complete
|
||||
- Note: Launching internal wine processes cannot specify a full path to exe */
|
||||
- status = CreateProcessW(thisDir,
|
||||
- command, NULL, NULL, TRUE, 0, NULL, NULL, &st, &pe);
|
||||
- heap_free(st.lpReserved2);
|
||||
- if ((opt_c || opt_k) && !opt_s && !status
|
||||
- && GetLastError()==ERROR_FILE_NOT_FOUND && command[0]=='\"') {
|
||||
- /* strip first and last quote WCHARacters and try again */
|
||||
- WCMD_strip_quotes(command);
|
||||
- opt_s = TRUE;
|
||||
- WCMD_run_program(command, called);
|
||||
+ /* Calculate what program will be launched, and whether it is a
|
||||
+ console application or not. Note the program may be different
|
||||
+ from the parameter (eg running a .txt file will launch notepad.exe) */
|
||||
+ hinst = FindExecutableW (thisDir, NULL, temp);
|
||||
+ if ((INT_PTR)hinst < 32)
|
||||
+ console = 0; /* Assume not console app by default */
|
||||
+ else
|
||||
+ console = SHGetFileInfoW(temp, 0, &psfi, sizeof(psfi), SHGFI_EXETYPE);
|
||||
+
|
||||
+
|
||||
+ /* If it is not a .com or .exe, try to launch through ShellExecuteExW
|
||||
+ which takes into account the association for the extension. */
|
||||
+ if (ext && (wcsicmp(ext, exeExt) && wcsicmp(ext, comExt))) {
|
||||
+
|
||||
+ SHELLEXECUTEINFOW shexw;
|
||||
+ BOOL rc;
|
||||
+ WCHAR *rawarg;
|
||||
+
|
||||
+ WCMD_parameter(command, 1, &rawarg, FALSE, TRUE);
|
||||
+ WINE_TRACE("Launching via ShellExecuteEx\n");
|
||||
+ memset(&shexw, 0x00, sizeof(shexw));
|
||||
+ shexw.cbSize = sizeof(SHELLEXECUTEINFOW);
|
||||
+ shexw.fMask = SEE_MASK_NO_CONSOLE | /* Run in same console as currently using */
|
||||
+ SEE_MASK_NOCLOSEPROCESS; /* We need a process handle to possibly wait on */
|
||||
+ shexw.lpFile = thisDir;
|
||||
+ shexw.lpParameters = rawarg;
|
||||
+ shexw.nShow = SW_SHOWNORMAL;
|
||||
+
|
||||
+ /* Try to launch the binary or its associated program */
|
||||
+ rc = ShellExecuteExW(&shexw);
|
||||
+
|
||||
+ if (rc && (INT_PTR)shexw.hInstApp >= 32) {
|
||||
+
|
||||
+ WINE_TRACE("Successfully launched\n");
|
||||
+
|
||||
+ /* It worked... Always wait when non-interactive (cmd /c or in
|
||||
+ batch program), or for console applications */
|
||||
+ if (!interactive || (console && !HIWORD(console))) {
|
||||
+ WINE_TRACE("Waiting for process to end\n");
|
||||
+ WaitForSingleObject (shexw.hProcess, INFINITE);
|
||||
+ }
|
||||
+
|
||||
+ GetExitCodeProcess (shexw.hProcess, &errorlevel);
|
||||
+ if (errorlevel == STILL_ACTIVE) {
|
||||
+ WINE_TRACE("Process still running, but returning anyway\n");
|
||||
+ errorlevel = 0;
|
||||
+ } else {
|
||||
+ WINE_TRACE("Process ended, errorlevel %d\n", errorlevel);
|
||||
+ }
|
||||
+
|
||||
+ CloseHandle(pe.hProcess);
|
||||
return;
|
||||
+
|
||||
}
|
||||
+ }
|
||||
|
||||
- if (!status)
|
||||
- break;
|
||||
+ /* If its a .exe or .com or the shellexecute failed due to no association,
|
||||
+ CreateProcess directly */
|
||||
+ ZeroMemory (&st, sizeof(STARTUPINFOW));
|
||||
+ st.cb = sizeof(STARTUPINFOW);
|
||||
+ init_msvcrt_io_block(&st);
|
||||
+
|
||||
+ /* Launch the process and if a CUI wait on it to complete
|
||||
+ Note: Launching internal wine processes cannot specify a full path to exe */
|
||||
+ WINE_TRACE("Launching via CreateProcess\n");
|
||||
+ status = CreateProcessW(thisDir,
|
||||
+ command, NULL, NULL, TRUE, 0, NULL, NULL, &st, &pe);
|
||||
+ heap_free(st.lpReserved2);
|
||||
+ if ((opt_c || opt_k) && !opt_s && !status
|
||||
+ && GetLastError()==ERROR_FILE_NOT_FOUND && command[0]=='\"') {
|
||||
+ /* strip first and last quote WCHARacters and try again */
|
||||
+ WCMD_strip_quotes(command);
|
||||
+ opt_s = TRUE;
|
||||
+ WCMD_run_program(command, called);
|
||||
+ return;
|
||||
+ }
|
||||
|
||||
- /* Always wait when non-interactive (cmd /c or in batch program),
|
||||
- or for console applications */
|
||||
- if (!interactive || (console && !HIWORD(console)))
|
||||
- WaitForSingleObject (pe.hProcess, INFINITE);
|
||||
- GetExitCodeProcess (pe.hProcess, &errorlevel);
|
||||
- if (errorlevel == STILL_ACTIVE) errorlevel = 0;
|
||||
+ if (!status) {
|
||||
+ WINE_TRACE("Failed to launch via CreateProcess, rc %d (%d)\n",
|
||||
+ status, GetLastError());
|
||||
+ break;
|
||||
+ }
|
||||
|
||||
- CloseHandle(pe.hProcess);
|
||||
- CloseHandle(pe.hThread);
|
||||
- return;
|
||||
+ /* Always wait when non-interactive (cmd /c or in batch program),
|
||||
+ or for console applications */
|
||||
+ if (!interactive || (console && !HIWORD(console))) {
|
||||
+ WINE_TRACE("Waiting for process to end\n");
|
||||
+ WaitForSingleObject (pe.hProcess, INFINITE);
|
||||
}
|
||||
+
|
||||
+ GetExitCodeProcess (pe.hProcess, &errorlevel);
|
||||
+ if (errorlevel == STILL_ACTIVE) {
|
||||
+ WINE_TRACE("Process still running, but returning anyway\n");
|
||||
+ errorlevel = 0;
|
||||
+ } else {
|
||||
+ WINE_TRACE("Process ended, errorlevel %d\n", errorlevel);
|
||||
+ }
|
||||
+
|
||||
+ CloseHandle(pe.hProcess);
|
||||
+ CloseHandle(pe.hThread);
|
||||
+ return;
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.17.1
|
||||
|
@@ -0,0 +1,79 @@
|
||||
From 7bb9825d921f91be01144110f6478a0c017cbd79 Mon Sep 17 00:00:00 2001
|
||||
From: Jason Edmeades <us@edmeades.me.uk>
|
||||
Date: Tue, 16 Jul 2019 13:51:58 +1000
|
||||
Subject: [PATCH 2/2] cmd: ftype failed to clear file associations
|
||||
|
||||
If a file association was set (e.g. ftype fred=xxx), ftype fred= needs to clear it,
|
||||
but previously it failed to do so.
|
||||
---
|
||||
programs/cmd/builtins.c | 6 +++---
|
||||
programs/cmd/tests/test_builtins.cmd | 9 +++++++++
|
||||
programs/cmd/tests/test_builtins.cmd.exp | 5 ++++-
|
||||
3 files changed, 16 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c
|
||||
index 62ae19a494..e85e553c05 100644
|
||||
--- a/programs/cmd/builtins.c
|
||||
+++ b/programs/cmd/builtins.c
|
||||
@@ -4939,11 +4939,11 @@ void WCMD_assoc (const WCHAR *args, BOOL assoc) {
|
||||
/* If nothing after '=' then clear value - only valid for ASSOC */
|
||||
if (*newValue == 0x00) {
|
||||
|
||||
- if (assoc) rc = RegDeleteKeyW(key, args);
|
||||
- if (assoc && rc == ERROR_SUCCESS) {
|
||||
+ rc = RegDeleteTreeW(key, args);
|
||||
+ if (rc == ERROR_SUCCESS) {
|
||||
WINE_TRACE("HKCR Key '%s' deleted\n", wine_dbgstr_w(args));
|
||||
|
||||
- } else if (assoc && rc != ERROR_FILE_NOT_FOUND) {
|
||||
+ } else if (rc != ERROR_FILE_NOT_FOUND) {
|
||||
WCMD_print_error();
|
||||
errorlevel = 2;
|
||||
|
||||
diff --git a/programs/cmd/tests/test_builtins.cmd b/programs/cmd/tests/test_builtins.cmd
|
||||
index f4dfc9f26d..0ef049a4ab 100644
|
||||
--- a/programs/cmd/tests/test_builtins.cmd
|
||||
+++ b/programs/cmd/tests/test_builtins.cmd
|
||||
@@ -2440,6 +2440,12 @@ echo echo +++>> tmp.cmd
|
||||
echo ftype footype>> tmp.cmd
|
||||
cmd /c tmp.cmd
|
||||
|
||||
+echo --- testing association
|
||||
+ftype footype=cmd.exe /c "echo '%%1'"
|
||||
+echo dummy>test.foo
|
||||
+test.foo
|
||||
+del test.foo
|
||||
+
|
||||
echo --- resetting association
|
||||
assoc .foo=
|
||||
|
||||
@@ -2471,6 +2477,9 @@ echo .foo=footype
|
||||
echo footype=foo_opencmd
|
||||
echo +++
|
||||
echo footype=foo_opencmd
|
||||
+echo --- testing association
|
||||
+echo footype=cmd.exe /c "echo '%%1'"
|
||||
+echo Skipped as not enough permissions
|
||||
echo --- resetting association
|
||||
echo original value
|
||||
|
||||
diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp
|
||||
index d78d91a6cf..e6ebe06714 100644
|
||||
--- a/programs/cmd/tests/test_builtins.cmd.exp
|
||||
+++ b/programs/cmd/tests/test_builtins.cmd.exp
|
||||
@@ -1444,8 +1444,11 @@ footype=foo_opencmd
|
||||
footype=foo_opencmd
|
||||
+++
|
||||
footype=foo_opencmd
|
||||
+--- testing association
|
||||
+footype=cmd.exe /c "echo '%1'"
|
||||
+'@drive@@path@foobar\test.foo'@or_broken@Skipped as not enough permissions
|
||||
--- resetting association
|
||||
-@todo_wine@original value@or_broken@buggyXP@or_broken@!WINE_FOO!
|
||||
+original value@or_broken@buggyXP@or_broken@!WINE_FOO!
|
||||
------------ Testing CALL ------------
|
||||
--- external script
|
||||
foo@space@
|
||||
--
|
||||
2.17.1
|
||||
|
2
patches/cmd-launch-association/definition
Normal file
2
patches/cmd-launch-association/definition
Normal file
@@ -0,0 +1,2 @@
|
||||
Fixes: [18154] cmd: Support for launching programs based on file association
|
||||
# Fixes: [36646]
|
@@ -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
|
@@ -0,0 +1,446 @@
|
||||
From 953112b017a794a550491f0008d599bd78b37dd0 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Mon, 1 Jul 2019 15:40:59 +1000
|
||||
Subject: [PATCH] d3dx9_36: Implement D3DXCreateKeyframedAnimationSet
|
||||
|
||||
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45481
|
||||
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
---
|
||||
dlls/d3dx9_36/animation.c | 370 ++++++++++++++++++++++++++++++++++++-
|
||||
dlls/d3dx9_36/tests/mesh.c | 27 +++
|
||||
2 files changed, 394 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3dx9_36/animation.c b/dlls/d3dx9_36/animation.c
|
||||
index de6d69d383..4828f2b8d0 100644
|
||||
--- a/dlls/d3dx9_36/animation.c
|
||||
+++ b/dlls/d3dx9_36/animation.c
|
||||
@@ -468,14 +468,378 @@ HRESULT WINAPI D3DXCreateAnimationController(UINT max_outputs, UINT max_sets,
|
||||
return D3D_OK;
|
||||
}
|
||||
|
||||
+struct d3dx9_animation_frame_set
|
||||
+{
|
||||
+ ID3DXKeyframedAnimationSet ID3DXKeyframedAnimationSet_iface;
|
||||
+ LONG ref;
|
||||
+
|
||||
+ char *name;
|
||||
+ double ticks_per_second;
|
||||
+ D3DXPLAYBACK_TYPE playback_type;
|
||||
+ UINT animation_count;
|
||||
+ UINT callback_key_count;
|
||||
+ const D3DXKEY_CALLBACK *callback_keys;
|
||||
+};
|
||||
+
|
||||
+static inline struct d3dx9_animation_frame_set *impl_from_ID3DXKeyframedAnimationSet(ID3DXKeyframedAnimationSet *iface)
|
||||
+{
|
||||
+ return CONTAINING_RECORD(iface, struct d3dx9_animation_frame_set, ID3DXKeyframedAnimationSet_iface);
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_animation_framed_QueryInterface(ID3DXKeyframedAnimationSet *iface, REFIID riid, void **obj)
|
||||
+{
|
||||
+ TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), obj);
|
||||
+
|
||||
+ if (IsEqualGUID(riid, &IID_IUnknown) ||
|
||||
+ IsEqualGUID(riid, &IID_ID3DXAnimationSet) ||
|
||||
+ IsEqualGUID(riid, &IID_ID3DXKeyframedAnimationSet))
|
||||
+ {
|
||||
+ iface->lpVtbl->AddRef(iface);
|
||||
+ *obj = iface;
|
||||
+ return D3D_OK;
|
||||
+ }
|
||||
+
|
||||
+ WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid));
|
||||
+ *obj = NULL;
|
||||
+ return E_NOINTERFACE;
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI d3dx9_animation_framed_AddRef(ID3DXKeyframedAnimationSet *iface)
|
||||
+{
|
||||
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
|
||||
+ ULONG refcount = InterlockedIncrement(&framed->ref);
|
||||
+
|
||||
+ TRACE("%p increasing refcount to %u.\n", framed, refcount);
|
||||
+
|
||||
+ return refcount;
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI d3dx9_animation_framed_Release(ID3DXKeyframedAnimationSet *iface)
|
||||
+{
|
||||
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
|
||||
+ ULONG refcount = InterlockedDecrement(&framed->ref);
|
||||
+
|
||||
+ TRACE("%p decreasing refcount to %u.\n", framed, refcount);
|
||||
+
|
||||
+ if (!refcount)
|
||||
+ {
|
||||
+ heap_free(framed->name);
|
||||
+ HeapFree(GetProcessHeap(), 0, framed);
|
||||
+ }
|
||||
+
|
||||
+ return refcount;
|
||||
+}
|
||||
+
|
||||
+static const char * WINAPI d3dx9_animation_framed_GetName(ID3DXKeyframedAnimationSet *iface)
|
||||
+{
|
||||
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
|
||||
+ TRACE("framed %p.\n", framed);
|
||||
+ return framed->name;
|
||||
+}
|
||||
+
|
||||
+static DOUBLE WINAPI d3dx9_animation_framed_GetPeriod(ID3DXKeyframedAnimationSet *iface)
|
||||
+{
|
||||
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
|
||||
+ FIXME("framed %p stub.\n", framed);
|
||||
+ return 0.0f;
|
||||
+}
|
||||
+
|
||||
+static DOUBLE WINAPI d3dx9_animation_framed_GetPeriodicPosition(ID3DXKeyframedAnimationSet *iface, DOUBLE position)
|
||||
+{
|
||||
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
|
||||
+ FIXME("framed %p stub.\n", framed);
|
||||
+ return 0.0f;
|
||||
+}
|
||||
+
|
||||
+static UINT WINAPI d3dx9_animation_framed_GetNumAnimations(ID3DXKeyframedAnimationSet *iface)
|
||||
+{
|
||||
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
|
||||
+ FIXME("framed %p stub.\n", framed);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_animation_framed_GetAnimationNameByIndex(ID3DXKeyframedAnimationSet *iface, UINT index, const char **name)
|
||||
+{
|
||||
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
|
||||
+ FIXME("framed %p, name %p stub.\n", framed, name);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_animation_framed_GetAnimationIndexByName(ID3DXKeyframedAnimationSet *iface, const char *name, UINT *index)
|
||||
+{
|
||||
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
|
||||
+ FIXME("framed %p, name %s, index %p stub.\n", framed, debugstr_a(name), index);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_animation_framed_GetSRT(ID3DXKeyframedAnimationSet *iface, DOUBLE periodic_position, UINT animation, D3DXVECTOR3 *scale,
|
||||
+ D3DXQUATERNION *rotation, D3DXVECTOR3 *translation)
|
||||
+{
|
||||
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
|
||||
+ FIXME("framed %p, periodic_position %f, animation %u, scale %p rotation %p translation %p stub.\n",
|
||||
+ framed, periodic_position, animation, scale, rotation, translation);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_animation_framed_GetCallback(ID3DXKeyframedAnimationSet *iface, double position, DWORD flags, double *callback_position,
|
||||
+ void **callback_data)
|
||||
+{
|
||||
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
|
||||
+ FIXME("framed %p, position %f, flags 0x%08x, callback_position %p, callback_data %p stub.\n",
|
||||
+ framed, position, flags, callback_position, callback_data);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static D3DXPLAYBACK_TYPE WINAPI d3dx9_animation_framed_GetPlaybackType(ID3DXKeyframedAnimationSet *iface)
|
||||
+{
|
||||
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
|
||||
+ TRACE("framed %p.\n", framed);
|
||||
+ return framed->playback_type;
|
||||
+}
|
||||
+
|
||||
+static DOUBLE WINAPI d3dx9_animation_framed_GetSourceTicksPerSecond(ID3DXKeyframedAnimationSet *iface)
|
||||
+{
|
||||
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
|
||||
+ TRACE("framed %p.\n", framed);
|
||||
+ return framed->ticks_per_second;
|
||||
+}
|
||||
+
|
||||
+static UINT WINAPI d3dx9_animation_framed_GetNumScaleKeys(ID3DXKeyframedAnimationSet *iface, UINT keys)
|
||||
+{
|
||||
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
|
||||
+ FIXME("framed %p, keys %u stub.\n", framed, keys);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_animation_framed_GetScaleKeys(ID3DXKeyframedAnimationSet *iface, UINT animation, LPD3DXKEY_VECTOR3 scale_keys)
|
||||
+{
|
||||
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
|
||||
+ FIXME("framed %p, animation %u, scale_keys %p stub.\n", framed, animation, scale_keys);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_animation_framed_GetScaleKey(ID3DXKeyframedAnimationSet *iface, UINT animation, UINT key, LPD3DXKEY_VECTOR3 scale_key)
|
||||
+{
|
||||
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
|
||||
+ FIXME("framed %p, animation %u, key %u, scale_key %p stub.\n", framed, animation, key, scale_key);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_animation_framed_SetScaleKey(ID3DXKeyframedAnimationSet *iface, UINT animation, UINT key, LPD3DXKEY_VECTOR3 scale_key)
|
||||
+{
|
||||
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
|
||||
+ FIXME("framed %p, animation %u, key %u, scale_key %p stub.\n", framed, animation, key, scale_key);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static UINT WINAPI d3dx9_animation_framed_GetNumRotationKeys(ID3DXKeyframedAnimationSet *iface, UINT animation)
|
||||
+{
|
||||
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
|
||||
+ FIXME("framed %p, animation %u stub.\n", framed, animation);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_animation_framed_GetRotationKeys(ID3DXKeyframedAnimationSet *iface, UINT animation, LPD3DXKEY_QUATERNION rotation_keys)
|
||||
+{
|
||||
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
|
||||
+ FIXME("framed %p, animation %u, rotation_keys %p stub.\n", framed, animation, rotation_keys);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_animation_framed_GetRotationKey(ID3DXKeyframedAnimationSet *iface, UINT animation, UINT key, LPD3DXKEY_QUATERNION rotation_key)
|
||||
+{
|
||||
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
|
||||
+ FIXME("framed %p, animation %u, key %u, rotation_key %p stub.\n", framed, animation, key, rotation_key);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_animation_framed_SetRotationKey(ID3DXKeyframedAnimationSet *iface, UINT animation, UINT key, LPD3DXKEY_QUATERNION rotation_key)
|
||||
+{
|
||||
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
|
||||
+ FIXME("framed %p, animation %u, key %u, rotation_key %p stub.\n", framed, animation, key, rotation_key);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static UINT WINAPI d3dx9_animation_framed_GetNumTranslationKeys(ID3DXKeyframedAnimationSet *iface, UINT animation)
|
||||
+{
|
||||
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
|
||||
+ FIXME("framed %p, animation %u stub.\n", framed, animation);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_animation_framed_GetTranslationKeys(ID3DXKeyframedAnimationSet *iface, UINT animation, LPD3DXKEY_VECTOR3 translation_keys)
|
||||
+{
|
||||
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
|
||||
+ FIXME("framed %p, animation %u, rotation_key %p stub.\n", framed, animation, translation_keys);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_animation_framed_GetTranslationKey(ID3DXKeyframedAnimationSet *iface, UINT animation, UINT key, LPD3DXKEY_VECTOR3 translation_key)
|
||||
+{
|
||||
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
|
||||
+ FIXME("framed %p, animation %u, key %u, translation_key %p stub.\n", framed, animation, key, translation_key);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_animation_framed_SetTranslationKey(ID3DXKeyframedAnimationSet *iface, UINT animation, UINT key, LPD3DXKEY_VECTOR3 translation_key)
|
||||
+{
|
||||
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
|
||||
+ FIXME("framed %p, animation %u, key %u, translation_key %p stub.\n", framed, animation, key, translation_key);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static UINT WINAPI d3dx9_animation_framed_GetNumCallbackKeys(ID3DXKeyframedAnimationSet *iface)
|
||||
+{
|
||||
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
|
||||
+ FIXME("framed %p stub.\n", framed);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_animation_framed_GetCallbackKeys(ID3DXKeyframedAnimationSet *iface, LPD3DXKEY_CALLBACK callback_keys)
|
||||
+{
|
||||
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
|
||||
+ FIXME("framed %p, callback_keys %p stub.\n", framed, callback_keys);
|
||||
+
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_animation_framed_GetCallbackKey(ID3DXKeyframedAnimationSet *iface, UINT key, LPD3DXKEY_CALLBACK callback_key)
|
||||
+{
|
||||
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
|
||||
+ FIXME("framed %p, key %u, callback_key %p stub.\n", framed, key, callback_key);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_animation_framed_SetCallbackKey(ID3DXKeyframedAnimationSet *iface, UINT key, LPD3DXKEY_CALLBACK callback_key)
|
||||
+{
|
||||
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
|
||||
+ FIXME("framed %p, key %u, callback_key %p stub.\n", framed, key, callback_key);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_animation_framed_UnregisterScaleKey(ID3DXKeyframedAnimationSet *iface, UINT animation, UINT key)
|
||||
+{
|
||||
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
|
||||
+ FIXME("framed %p, animation %u, key %u stub.\n", framed, animation, key);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_animation_framed_UnregisterRotationKey(ID3DXKeyframedAnimationSet *iface, UINT animation, UINT key)
|
||||
+{
|
||||
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
|
||||
+ FIXME("framed %p, animation %u, key %u stub.\n", framed, animation, key);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_animation_framed_UnregisterTranslationKey(ID3DXKeyframedAnimationSet *iface, UINT animation, UINT key)
|
||||
+{
|
||||
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
|
||||
+ FIXME("framed %p, animation %u, key %u stub.\n", framed, animation, key);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_animation_framed_RegisterAnimationSRTKeys(ID3DXKeyframedAnimationSet *iface, const char *name, UINT num_scale_keys,
|
||||
+ UINT num_rotation_keys, UINT num_translation_keys, const D3DXKEY_VECTOR3 *scale_keys,
|
||||
+ const D3DXKEY_QUATERNION *rotation_keys, const D3DXKEY_VECTOR3 *translation_keys,
|
||||
+ DWORD *animation_index)
|
||||
+{
|
||||
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
|
||||
+ FIXME("framed %p, name %s, num_scale_keys %u, num_rotation_keys %u, rotation_keys %p, num_translation_keys %u, scale_keys %p, "
|
||||
+ "rotation_keys %u, translation_keys %p, animation_index %p stub.\n",
|
||||
+ framed, debugstr_a(name), num_scale_keys, num_rotation_keys, rotation_keys, num_translation_keys, scale_keys,
|
||||
+ rotation_keys, translation_keys, animation_index);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_animation_framed_Compress(ID3DXKeyframedAnimationSet *iface, DWORD flags, float lossiness,
|
||||
+ D3DXFRAME *hierarchy, ID3DXBuffer **compressed_data)
|
||||
+{
|
||||
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
|
||||
+ FIXME("framed %p, flags 0x%08x, lossiness %f, hierarchy %p, compressed_data %p stub.\n", framed, flags, lossiness,
|
||||
+ hierarchy, compressed_data);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_animation_framed_UnregisterAnimation(ID3DXKeyframedAnimationSet *iface, UINT index)
|
||||
+{
|
||||
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
|
||||
+ FIXME("framed %p, index %u stub.\n", framed, index);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static const struct ID3DXKeyframedAnimationSetVtbl d3dx9_animation_framed_vtbl =
|
||||
+{
|
||||
+ d3dx9_animation_framed_QueryInterface,
|
||||
+ d3dx9_animation_framed_AddRef,
|
||||
+ d3dx9_animation_framed_Release,
|
||||
+ d3dx9_animation_framed_GetName,
|
||||
+ d3dx9_animation_framed_GetPeriod,
|
||||
+ d3dx9_animation_framed_GetPeriodicPosition,
|
||||
+ d3dx9_animation_framed_GetNumAnimations,
|
||||
+ d3dx9_animation_framed_GetAnimationNameByIndex,
|
||||
+ d3dx9_animation_framed_GetAnimationIndexByName,
|
||||
+ d3dx9_animation_framed_GetSRT,
|
||||
+ d3dx9_animation_framed_GetCallback,
|
||||
+ d3dx9_animation_framed_GetPlaybackType,
|
||||
+ d3dx9_animation_framed_GetSourceTicksPerSecond,
|
||||
+ d3dx9_animation_framed_GetNumScaleKeys,
|
||||
+ d3dx9_animation_framed_GetScaleKeys,
|
||||
+ d3dx9_animation_framed_GetScaleKey,
|
||||
+ d3dx9_animation_framed_SetScaleKey,
|
||||
+ d3dx9_animation_framed_GetNumRotationKeys,
|
||||
+ d3dx9_animation_framed_GetRotationKeys,
|
||||
+ d3dx9_animation_framed_GetRotationKey,
|
||||
+ d3dx9_animation_framed_SetRotationKey,
|
||||
+ d3dx9_animation_framed_GetNumTranslationKeys,
|
||||
+ d3dx9_animation_framed_GetTranslationKeys,
|
||||
+ d3dx9_animation_framed_GetTranslationKey,
|
||||
+ d3dx9_animation_framed_SetTranslationKey,
|
||||
+ d3dx9_animation_framed_GetNumCallbackKeys,
|
||||
+ d3dx9_animation_framed_GetCallbackKeys,
|
||||
+ d3dx9_animation_framed_GetCallbackKey,
|
||||
+ d3dx9_animation_framed_SetCallbackKey,
|
||||
+ d3dx9_animation_framed_UnregisterScaleKey,
|
||||
+ d3dx9_animation_framed_UnregisterRotationKey,
|
||||
+ d3dx9_animation_framed_UnregisterTranslationKey,
|
||||
+ d3dx9_animation_framed_RegisterAnimationSRTKeys,
|
||||
+ d3dx9_animation_framed_Compress,
|
||||
+ d3dx9_animation_framed_UnregisterAnimation
|
||||
+};
|
||||
+
|
||||
HRESULT WINAPI D3DXCreateKeyframedAnimationSet(const char *name, double ticks_per_second,
|
||||
D3DXPLAYBACK_TYPE playback_type, UINT animation_count, UINT callback_key_count,
|
||||
const D3DXKEY_CALLBACK *callback_keys, ID3DXKeyframedAnimationSet **animation_set)
|
||||
{
|
||||
- FIXME("name %s, ticks_per_second %.16e, playback_type %u, animation_count %u, "
|
||||
- "callback_key_count %u, callback_keys %p, animation_set %p stub.\n",
|
||||
+ struct d3dx9_animation_frame_set *object;
|
||||
+
|
||||
+ TRACE("name %s, ticks_per_second %.16e, playback_type %u, animation_count %u, "
|
||||
+ "callback_key_count %u, callback_keys %p, animation_set %p.\n",
|
||||
debugstr_a(name), ticks_per_second, playback_type, animation_count,
|
||||
callback_key_count, callback_keys, animation_set);
|
||||
|
||||
- return E_NOTIMPL;
|
||||
+ if(!animation_count)
|
||||
+ return D3DERR_INVALIDCALL;
|
||||
+
|
||||
+ object = heap_alloc(sizeof(*object));
|
||||
+ if (!object)
|
||||
+ return E_OUTOFMEMORY;
|
||||
+
|
||||
+ object->ID3DXKeyframedAnimationSet_iface.lpVtbl = &d3dx9_animation_framed_vtbl;
|
||||
+ object->ref = 1;
|
||||
+ object->name = heap_alloc( strlen(name)+1 );
|
||||
+ if(!object->name)
|
||||
+ {
|
||||
+ heap_free(object);
|
||||
+ return E_OUTOFMEMORY;
|
||||
+ }
|
||||
+ strcpy(object->name, name);
|
||||
+ object->ticks_per_second = ticks_per_second;
|
||||
+ object->playback_type = playback_type;
|
||||
+ object->animation_count = animation_count;
|
||||
+ object->callback_key_count = callback_key_count;
|
||||
+ object->callback_keys = callback_keys;
|
||||
+
|
||||
+ *animation_set = &object->ID3DXKeyframedAnimationSet_iface;
|
||||
+
|
||||
+ return D3D_OK;
|
||||
}
|
||||
diff --git a/dlls/d3dx9_36/tests/mesh.c b/dlls/d3dx9_36/tests/mesh.c
|
||||
index da9b80c578..b75e3fce85 100644
|
||||
--- a/dlls/d3dx9_36/tests/mesh.c
|
||||
+++ b/dlls/d3dx9_36/tests/mesh.c
|
||||
@@ -11119,6 +11119,32 @@ static void D3DXCreateAnimationControllerTest(void)
|
||||
animation->lpVtbl->Release(animation);
|
||||
}
|
||||
|
||||
+static void D3DXCreateKeyframedAnimationSetTest(void)
|
||||
+{
|
||||
+ ID3DXKeyframedAnimationSet *framed;
|
||||
+ HRESULT hr;
|
||||
+ const char *name;
|
||||
+ D3DXPLAYBACK_TYPE playtype;
|
||||
+ UINT count;
|
||||
+
|
||||
+ hr = D3DXCreateKeyframedAnimationSet("wine_bottle", 5.0, D3DXPLAY_LOOP, 0, 0, NULL, &framed);
|
||||
+ ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr returned %#x.\n", hr);
|
||||
+
|
||||
+ hr = D3DXCreateKeyframedAnimationSet("wine_bottle", 5.0, D3DXPLAY_LOOP, 10, 0, NULL, &framed);
|
||||
+ ok(hr == D3D_OK, "Got unexpected hr returned %#x.\n", hr);
|
||||
+
|
||||
+ name = framed->lpVtbl->GetName(framed);
|
||||
+ ok(!strcmp(name, "wine_bottle"), "unexpected name (%s)\n", name);
|
||||
+
|
||||
+ playtype = framed->lpVtbl->GetPlaybackType(framed);
|
||||
+ ok(playtype == D3DXPLAY_LOOP, "unexpected value, got %d\n", playtype);
|
||||
+
|
||||
+ count = framed->lpVtbl->GetNumAnimations(framed);
|
||||
+ ok(count == 0, "unexpected value, got %d\n", count);
|
||||
+
|
||||
+ framed->lpVtbl->Release(framed);
|
||||
+}
|
||||
+
|
||||
static void test_D3DXFrameFind(void)
|
||||
{
|
||||
static char n1[] = "name1";
|
||||
@@ -11387,6 +11413,7 @@ START_TEST(mesh)
|
||||
D3DXCreateTextTest();
|
||||
D3DXCreateTorusTest();
|
||||
D3DXCreateAnimationControllerTest();
|
||||
+ D3DXCreateKeyframedAnimationSetTest();
|
||||
test_get_decl_length();
|
||||
test_get_decl_vertex_size();
|
||||
test_fvf_decl_conversion();
|
||||
--
|
||||
2.17.1
|
||||
|
@@ -0,0 +1 @@
|
||||
Fixes: [45481] d3dx9_36: Implement D3DXCreateKeyframedAnimationSet
|
@@ -1,4 +1,4 @@
|
||||
From 4e692713dface59a0e717e4ab9e2abf6b8223995 Mon Sep 17 00:00:00 2001
|
||||
From f22ce02d880a9a6723d202eaf959d1eaa7a4c3df Mon Sep 17 00:00:00 2001
|
||||
From: Christian Costa <titan.costa@gmail.com>
|
||||
Date: Sun, 11 Jan 2015 16:29:30 +0100
|
||||
Subject: [PATCH] d3dx9_36: Improve D3DXSaveTextureToFile to save simple
|
||||
@@ -6,17 +6,17 @@ Subject: [PATCH] d3dx9_36: Improve D3DXSaveTextureToFile to save simple
|
||||
|
||||
---
|
||||
dlls/d3dx9_36/d3dx9_private.h | 2 ++
|
||||
dlls/d3dx9_36/surface.c | 62 +++++++++++++++++++++++++++++++++++++++++++
|
||||
dlls/d3dx9_36/texture.c | 5 +---
|
||||
dlls/d3dx9_36/surface.c | 62 +++++++++++++++++++++++++++++++++++
|
||||
dlls/d3dx9_36/texture.c | 5 +--
|
||||
3 files changed, 65 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3dx9_36/d3dx9_private.h b/dlls/d3dx9_36/d3dx9_private.h
|
||||
index 5a28f2e..158aae3 100644
|
||||
index 9497343f422..679b57b2626 100644
|
||||
--- a/dlls/d3dx9_36/d3dx9_private.h
|
||||
+++ b/dlls/d3dx9_36/d3dx9_private.h
|
||||
@@ -125,6 +125,8 @@ HRESULT lock_surface(IDirect3DSurface9 *surface, D3DLOCKED_RECT *lock,
|
||||
@@ -125,6 +125,8 @@ HRESULT lock_surface(IDirect3DSurface9 *surface, const RECT *surface_rect, D3DLO
|
||||
IDirect3DSurface9 **temp_surface, BOOL write) DECLSPEC_HIDDEN;
|
||||
HRESULT unlock_surface(IDirect3DSurface9 *surface, D3DLOCKED_RECT *lock,
|
||||
HRESULT unlock_surface(IDirect3DSurface9 *surface, const RECT *surface_rect,
|
||||
IDirect3DSurface9 *temp_surface, BOOL update) DECLSPEC_HIDDEN;
|
||||
+HRESULT save_dds_texture_to_memory(ID3DXBuffer **dst_buffer, IDirect3DBaseTexture9 *src_texture,
|
||||
+ const PALETTEENTRY *src_palette) DECLSPEC_HIDDEN;
|
||||
@@ -24,10 +24,10 @@ index 5a28f2e..158aae3 100644
|
||||
unsigned short float_32_to_16(const float in) DECLSPEC_HIDDEN;
|
||||
float float_16_to_32(const unsigned short in) DECLSPEC_HIDDEN;
|
||||
diff --git a/dlls/d3dx9_36/surface.c b/dlls/d3dx9_36/surface.c
|
||||
index f5dc799..e0d84fd 100644
|
||||
index aa9ee891b54..9871d211a7c 100644
|
||||
--- a/dlls/d3dx9_36/surface.c
|
||||
+++ b/dlls/d3dx9_36/surface.c
|
||||
@@ -611,6 +611,68 @@ static HRESULT save_dds_surface_to_memory(ID3DXBuffer **dst_buffer, IDirect3DSur
|
||||
@@ -636,6 +636,68 @@ static HRESULT save_dds_surface_to_memory(ID3DXBuffer **dst_buffer, IDirect3DSur
|
||||
return D3D_OK;
|
||||
}
|
||||
|
||||
@@ -97,10 +97,10 @@ index f5dc799..e0d84fd 100644
|
||||
const D3DBOX *dst_box, const void *src_data, const D3DBOX *src_box, DWORD filter, D3DCOLOR color_key,
|
||||
const D3DXIMAGE_INFO *src_info)
|
||||
diff --git a/dlls/d3dx9_36/texture.c b/dlls/d3dx9_36/texture.c
|
||||
index e2dfab8..9f0e541 100644
|
||||
index 26d07ca9f66..b743d5cfad0 100644
|
||||
--- a/dlls/d3dx9_36/texture.c
|
||||
+++ b/dlls/d3dx9_36/texture.c
|
||||
@@ -1906,10 +1906,7 @@ HRESULT WINAPI D3DXSaveTextureToFileInMemory(ID3DXBuffer **dst_buffer, D3DXIMAGE
|
||||
@@ -1904,10 +1904,7 @@ HRESULT WINAPI D3DXSaveTextureToFileInMemory(ID3DXBuffer **dst_buffer, D3DXIMAGE
|
||||
if (!dst_buffer || !src_texture) return D3DERR_INVALIDCALL;
|
||||
|
||||
if (file_format == D3DXIFF_DDS)
|
||||
@@ -113,5 +113,5 @@ index e2dfab8..9f0e541 100644
|
||||
type = IDirect3DBaseTexture9_GetType(src_texture);
|
||||
switch (type)
|
||||
--
|
||||
1.9.1
|
||||
2.17.1
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 4595b49c9c878e8a86fcd22dc82a9f5cfadfc7a8 Mon Sep 17 00:00:00 2001
|
||||
From 3fb7038ed7f1ebbadd60465f68ed0e61ba81e730 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Costa <titan.costa@gmail.com>
|
||||
Date: Fri, 30 Mar 2018 08:22:02 +0000
|
||||
Subject: [PATCH] d3dx9_36: add DXTn support
|
||||
@@ -29,164 +29,164 @@ Subject: [PATCH] d3dx9_36: add DXTn support
|
||||
22 files changed, 118 insertions(+), 32 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3dx9_24/Makefile.in b/dlls/d3dx9_24/Makefile.in
|
||||
index 99db5f355..0c3fb8a90 100644
|
||||
index a327292b8..b43b1be81 100644
|
||||
--- a/dlls/d3dx9_24/Makefile.in
|
||||
+++ b/dlls/d3dx9_24/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
EXTRADEFS = -DD3DX_SDK_VERSION=24
|
||||
MODULE = d3dx9_24.dll
|
||||
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 wined3d
|
||||
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase wined3d
|
||||
PARENTSRC = ../d3dx9_36
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_25/Makefile.in b/dlls/d3dx9_25/Makefile.in
|
||||
index 9e54aba2c..4419b18b8 100644
|
||||
index ccf374832..edcba8b59 100644
|
||||
--- a/dlls/d3dx9_25/Makefile.in
|
||||
+++ b/dlls/d3dx9_25/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
EXTRADEFS = -DD3DX_SDK_VERSION=25
|
||||
MODULE = d3dx9_25.dll
|
||||
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 wined3d
|
||||
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase wined3d
|
||||
PARENTSRC = ../d3dx9_36
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_26/Makefile.in b/dlls/d3dx9_26/Makefile.in
|
||||
index 104f7c19b..cfc9711ef 100644
|
||||
index 21ef9e00b..72d0e0ce1 100644
|
||||
--- a/dlls/d3dx9_26/Makefile.in
|
||||
+++ b/dlls/d3dx9_26/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
EXTRADEFS = -DD3DX_SDK_VERSION=26
|
||||
MODULE = d3dx9_26.dll
|
||||
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 wined3d
|
||||
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase wined3d
|
||||
PARENTSRC = ../d3dx9_36
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_27/Makefile.in b/dlls/d3dx9_27/Makefile.in
|
||||
index db04c8310..d598c9bbf 100644
|
||||
index 3adea191c..24763cb10 100644
|
||||
--- a/dlls/d3dx9_27/Makefile.in
|
||||
+++ b/dlls/d3dx9_27/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
EXTRADEFS = -DD3DX_SDK_VERSION=27
|
||||
MODULE = d3dx9_27.dll
|
||||
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 wined3d
|
||||
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase wined3d
|
||||
PARENTSRC = ../d3dx9_36
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_28/Makefile.in b/dlls/d3dx9_28/Makefile.in
|
||||
index 8a2b9c690..8e9979092 100644
|
||||
index bd75a23d2..ce041b069 100644
|
||||
--- a/dlls/d3dx9_28/Makefile.in
|
||||
+++ b/dlls/d3dx9_28/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
EXTRADEFS = -DD3DX_SDK_VERSION=28
|
||||
MODULE = d3dx9_28.dll
|
||||
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 wined3d
|
||||
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase wined3d
|
||||
PARENTSRC = ../d3dx9_36
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_29/Makefile.in b/dlls/d3dx9_29/Makefile.in
|
||||
index 6e1f45c02..efe538fde 100644
|
||||
index 491c105ab..99ab2ded7 100644
|
||||
--- a/dlls/d3dx9_29/Makefile.in
|
||||
+++ b/dlls/d3dx9_29/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
EXTRADEFS = -DD3DX_SDK_VERSION=29
|
||||
MODULE = d3dx9_29.dll
|
||||
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 wined3d
|
||||
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase wined3d
|
||||
PARENTSRC = ../d3dx9_36
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_30/Makefile.in b/dlls/d3dx9_30/Makefile.in
|
||||
index 092a6b154..4a1ee6304 100644
|
||||
index 44e28b79f..bcf0b1c82 100644
|
||||
--- a/dlls/d3dx9_30/Makefile.in
|
||||
+++ b/dlls/d3dx9_30/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
EXTRADEFS = -DD3DX_SDK_VERSION=30
|
||||
MODULE = d3dx9_30.dll
|
||||
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 wined3d
|
||||
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase wined3d
|
||||
PARENTSRC = ../d3dx9_36
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_31/Makefile.in b/dlls/d3dx9_31/Makefile.in
|
||||
index 48c67e6e0..dcbb7a01b 100644
|
||||
index 0f16d27fd..7c980fbb8 100644
|
||||
--- a/dlls/d3dx9_31/Makefile.in
|
||||
+++ b/dlls/d3dx9_31/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
EXTRADEFS = -DD3DX_SDK_VERSION=31
|
||||
MODULE = d3dx9_31.dll
|
||||
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 wined3d
|
||||
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase wined3d
|
||||
PARENTSRC = ../d3dx9_36
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_32/Makefile.in b/dlls/d3dx9_32/Makefile.in
|
||||
index d51d6a0db..fb89ea7c2 100644
|
||||
index 99357dcce..e493bd8a6 100644
|
||||
--- a/dlls/d3dx9_32/Makefile.in
|
||||
+++ b/dlls/d3dx9_32/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
EXTRADEFS = -DD3DX_SDK_VERSION=32
|
||||
MODULE = d3dx9_32.dll
|
||||
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 wined3d
|
||||
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase wined3d
|
||||
PARENTSRC = ../d3dx9_36
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_33/Makefile.in b/dlls/d3dx9_33/Makefile.in
|
||||
index 52cdde13a..487255e43 100644
|
||||
index 5a92dca61..fba4106af 100644
|
||||
--- a/dlls/d3dx9_33/Makefile.in
|
||||
+++ b/dlls/d3dx9_33/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
EXTRADEFS = -DD3DX_SDK_VERSION=33
|
||||
MODULE = d3dx9_33.dll
|
||||
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 wined3d
|
||||
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase wined3d
|
||||
PARENTSRC = ../d3dx9_36
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_34/Makefile.in b/dlls/d3dx9_34/Makefile.in
|
||||
index 37f431228..9b0b500f7 100644
|
||||
index 84cca56ec..e03d8ebd5 100644
|
||||
--- a/dlls/d3dx9_34/Makefile.in
|
||||
+++ b/dlls/d3dx9_34/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
EXTRADEFS = -DD3DX_SDK_VERSION=34
|
||||
MODULE = d3dx9_34.dll
|
||||
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 wined3d
|
||||
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase wined3d
|
||||
PARENTSRC = ../d3dx9_36
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_35/Makefile.in b/dlls/d3dx9_35/Makefile.in
|
||||
index 4441b5f6e..ac4291359 100644
|
||||
index 640f30620..ea19e55b2 100644
|
||||
--- a/dlls/d3dx9_35/Makefile.in
|
||||
+++ b/dlls/d3dx9_35/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
EXTRADEFS = -DD3DX_SDK_VERSION=35
|
||||
MODULE = d3dx9_35.dll
|
||||
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 wined3d
|
||||
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase wined3d
|
||||
PARENTSRC = ../d3dx9_36
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_36/Makefile.in b/dlls/d3dx9_36/Makefile.in
|
||||
index 5e76ab7f5..c95dc0707 100644
|
||||
index b8a173ce0..3f96b6656 100644
|
||||
--- a/dlls/d3dx9_36/Makefile.in
|
||||
+++ b/dlls/d3dx9_36/Makefile.in
|
||||
@@ -1,7 +1,7 @@
|
||||
EXTRADEFS = -DD3DX_SDK_VERSION=36
|
||||
MODULE = d3dx9_36.dll
|
||||
IMPORTLIB = d3dx9
|
||||
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 wined3d
|
||||
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase wined3d
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
EXTRADLLFLAGS = -mno-cygwin
|
||||
diff --git a/dlls/d3dx9_36/surface.c b/dlls/d3dx9_36/surface.c
|
||||
index 57d9818cd..f05bad5ab 100644
|
||||
index 8e9b834d8..83c30338e 100644
|
||||
--- a/dlls/d3dx9_36/surface.c
|
||||
+++ b/dlls/d3dx9_36/surface.c
|
||||
@@ -25,6 +25,8 @@
|
||||
@@ -198,7 +198,7 @@ index 57d9818cd..f05bad5ab 100644
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3dx);
|
||||
|
||||
HRESULT WINAPI WICCreateImagingFactory_Proxy(UINT, IWICImagingFactory**);
|
||||
@@ -1772,6 +1774,24 @@ void point_filter_argb_pixels(const BYTE *src, UINT src_row_pitch, UINT src_slic
|
||||
@@ -1798,6 +1800,24 @@ void point_filter_argb_pixels(const BYTE *src, UINT src_row_pitch, UINT src_slic
|
||||
}
|
||||
}
|
||||
|
||||
@@ -223,7 +223,7 @@ index 57d9818cd..f05bad5ab 100644
|
||||
/************************************************************
|
||||
* D3DXLoadSurfaceFromMemory
|
||||
*
|
||||
@@ -1811,10 +1831,12 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface,
|
||||
@@ -1837,10 +1857,12 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface,
|
||||
{
|
||||
const struct pixel_format_desc *srcformatdesc, *destformatdesc;
|
||||
IDirect3DSurface9 *surface;
|
||||
@@ -237,7 +237,7 @@ index 57d9818cd..f05bad5ab 100644
|
||||
|
||||
TRACE("(%p, %p, %s, %p, %#x, %u, %p, %s, %#x, 0x%08x)\n",
|
||||
dst_surface, dst_palette, wine_dbgstr_rect(dst_rect), src_memory, src_format,
|
||||
@@ -1895,18 +1917,65 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface,
|
||||
@@ -1921,18 +1943,65 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface,
|
||||
}
|
||||
else /* Stretching or format conversion. */
|
||||
{
|
||||
@@ -252,7 +252,7 @@ index 57d9818cd..f05bad5ab 100644
|
||||
+ (!post_convert && !is_conversion_to_supported(destformatdesc)))
|
||||
{
|
||||
FIXME("Unsupported format conversion %#x -> %#x.\n", src_format, surfdesc.Format);
|
||||
unlock_surface(dst_surface, &lockrect, surface, FALSE);
|
||||
unlock_surface(dst_surface, dst_rect, surface, FALSE);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
@@ -307,7 +307,7 @@ index 57d9818cd..f05bad5ab 100644
|
||||
}
|
||||
else /* if ((filter & 0xf) == D3DX_FILTER_POINT) */
|
||||
{
|
||||
@@ -1915,12 +1984,29 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface,
|
||||
@@ -1941,12 +2010,29 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface,
|
||||
|
||||
/* Always apply a point filter until D3DX_FILTER_LINEAR,
|
||||
* D3DX_FILTER_TRIANGLE and D3DX_FILTER_BOX are implemented. */
|
||||
@@ -328,23 +328,23 @@ index 57d9818cd..f05bad5ab 100644
|
||||
}
|
||||
}
|
||||
|
||||
- return unlock_surface(dst_surface, &lockrect, surface, TRUE);
|
||||
- return unlock_surface(dst_surface, dst_rect, surface, TRUE);
|
||||
+done:
|
||||
+ if (pre_convert)
|
||||
+ HeapFree(GetProcessHeap(), 0, tmp_src_memory);
|
||||
+ if (post_convert)
|
||||
+ HeapFree(GetProcessHeap(), 0, tmp_dst_memory);
|
||||
+
|
||||
+ unlock_surface(dst_surface, &lockrect, surface, TRUE);
|
||||
+ unlock_surface(dst_surface, dst_rect, surface, TRUE);
|
||||
+ return hr;
|
||||
}
|
||||
|
||||
/************************************************************
|
||||
diff --git a/dlls/d3dx9_36/tests/surface.c b/dlls/d3dx9_36/tests/surface.c
|
||||
index 56b79d80c..8614cec4c 100644
|
||||
index 4a10492a0..d59ff028a 100644
|
||||
--- a/dlls/d3dx9_36/tests/surface.c
|
||||
+++ b/dlls/d3dx9_36/tests/surface.c
|
||||
@@ -1225,7 +1225,7 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
|
||||
@@ -1242,7 +1242,7 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
|
||||
hr = IDirect3DTexture9_GetSurfaceLevel(tex, 0, &newsurf);
|
||||
ok(SUCCEEDED(hr), "Failed to get the surface, hr %#x.\n", hr);
|
||||
hr = D3DXLoadSurfaceFromSurface(newsurf, NULL, NULL, surf, NULL, NULL, D3DX_FILTER_NONE, 0);
|
||||
@@ -353,7 +353,7 @@ index 56b79d80c..8614cec4c 100644
|
||||
check_release((IUnknown*)newsurf, 1);
|
||||
check_release((IUnknown*)tex, 0);
|
||||
}
|
||||
@@ -1251,7 +1251,7 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
|
||||
@@ -1268,7 +1268,7 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
|
||||
hr = IDirect3DTexture9_GetSurfaceLevel(tex, 0, &newsurf);
|
||||
ok(SUCCEEDED(hr), "Failed to get the surface, hr %#x.\n", hr);
|
||||
hr = D3DXLoadSurfaceFromSurface(newsurf, NULL, NULL, surf, NULL, NULL, D3DX_FILTER_NONE, 0);
|
||||
@@ -362,7 +362,7 @@ index 56b79d80c..8614cec4c 100644
|
||||
check_release((IUnknown*)newsurf, 1);
|
||||
check_release((IUnknown*)tex, 0);
|
||||
}
|
||||
@@ -1264,10 +1264,10 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
|
||||
@@ -1281,10 +1281,10 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
|
||||
hr = IDirect3DTexture9_GetSurfaceLevel(tex, 0, &newsurf);
|
||||
ok(SUCCEEDED(hr), "Failed to get the surface, hr %#x.\n", hr);
|
||||
hr = D3DXLoadSurfaceFromSurface(newsurf, NULL, NULL, surf, NULL, NULL, D3DX_FILTER_NONE, 0);
|
||||
@@ -376,89 +376,89 @@ index 56b79d80c..8614cec4c 100644
|
||||
check_release((IUnknown*)newsurf, 1);
|
||||
check_release((IUnknown*)tex, 0);
|
||||
diff --git a/dlls/d3dx9_37/Makefile.in b/dlls/d3dx9_37/Makefile.in
|
||||
index ea0a04807..a710cef03 100644
|
||||
index d16a0ce05..669482dee 100644
|
||||
--- a/dlls/d3dx9_37/Makefile.in
|
||||
+++ b/dlls/d3dx9_37/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
EXTRADEFS = -DD3DX_SDK_VERSION=37
|
||||
MODULE = d3dx9_37.dll
|
||||
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 wined3d
|
||||
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase wined3d
|
||||
PARENTSRC = ../d3dx9_36
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_38/Makefile.in b/dlls/d3dx9_38/Makefile.in
|
||||
index af62f823d..543a482af 100644
|
||||
index 4a02ab417..1f43705e7 100644
|
||||
--- a/dlls/d3dx9_38/Makefile.in
|
||||
+++ b/dlls/d3dx9_38/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
EXTRADEFS = -DD3DX_SDK_VERSION=38
|
||||
MODULE = d3dx9_38.dll
|
||||
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 wined3d
|
||||
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase wined3d
|
||||
PARENTSRC = ../d3dx9_36
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_39/Makefile.in b/dlls/d3dx9_39/Makefile.in
|
||||
index ab71712d4..cacb0c00d 100644
|
||||
index 5a3840574..690ed7d31 100644
|
||||
--- a/dlls/d3dx9_39/Makefile.in
|
||||
+++ b/dlls/d3dx9_39/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
EXTRADEFS = -DD3DX_SDK_VERSION=39
|
||||
MODULE = d3dx9_39.dll
|
||||
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 wined3d
|
||||
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase wined3d
|
||||
PARENTSRC = ../d3dx9_36
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_40/Makefile.in b/dlls/d3dx9_40/Makefile.in
|
||||
index 76428d2fd..a58a99ef2 100644
|
||||
index 581e18dba..8e6984683 100644
|
||||
--- a/dlls/d3dx9_40/Makefile.in
|
||||
+++ b/dlls/d3dx9_40/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
EXTRADEFS = -DD3DX_SDK_VERSION=40
|
||||
MODULE = d3dx9_40.dll
|
||||
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 wined3d
|
||||
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase wined3d
|
||||
PARENTSRC = ../d3dx9_36
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_41/Makefile.in b/dlls/d3dx9_41/Makefile.in
|
||||
index d3647f895..93fb6b508 100644
|
||||
index 63a0be753..37fb2f3e6 100644
|
||||
--- a/dlls/d3dx9_41/Makefile.in
|
||||
+++ b/dlls/d3dx9_41/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
EXTRADEFS = -DD3DX_SDK_VERSION=41
|
||||
MODULE = d3dx9_41.dll
|
||||
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 wined3d
|
||||
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase wined3d
|
||||
PARENTSRC = ../d3dx9_36
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_42/Makefile.in b/dlls/d3dx9_42/Makefile.in
|
||||
index 88bd746da..197d0d45b 100644
|
||||
index ff391a202..2d706c5f8 100644
|
||||
--- a/dlls/d3dx9_42/Makefile.in
|
||||
+++ b/dlls/d3dx9_42/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
EXTRADEFS = -DD3DX_SDK_VERSION=42
|
||||
MODULE = d3dx9_42.dll
|
||||
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 wined3d
|
||||
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase wined3d
|
||||
PARENTSRC = ../d3dx9_36
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_43/Makefile.in b/dlls/d3dx9_43/Makefile.in
|
||||
index 2f6b8634a..17895954a 100644
|
||||
index e009a41c5..d539f6b22 100644
|
||||
--- a/dlls/d3dx9_43/Makefile.in
|
||||
+++ b/dlls/d3dx9_43/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
EXTRADEFS = -DD3DX_SDK_VERSION=43
|
||||
MODULE = d3dx9_43.dll
|
||||
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 wined3d
|
||||
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase wined3d
|
||||
PARENTSRC = ../d3dx9_36
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
--
|
||||
2.21.0
|
||||
2.22.0
|
||||
|
||||
|
@@ -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
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user