Compare commits

..

67 Commits

Author SHA1 Message Date
Alistair Leslie-Hughes
f07181375b Release v4.12.1 2019-07-07 21:17:23 +10:00
Alistair Leslie-Hughes
35f28c4538 Rebase against 40a83b2ff3bca9ef58d03400a3c8e4aac94a0dc7 2019-07-07 13:18:09 +10:00
Alistair Leslie-Hughes
4babcaf231 Release v4.12 2019-07-06 17:50:06 +10:00
Alistair Leslie-Hughes
eba1e9b28a Rebase against 8c34add3bd747d8ff267974de67880b7eb50bc8d 2019-07-06 15:21:16 +10:00
Alistair Leslie-Hughes
52076762ec Rebase against 201d13a3c31131f204f89d61be37bf75d58dc6dd 2019-07-05 08:25:41 +10:00
Alistair Leslie-Hughes
e1bfd97e2b Reenabled d3dx9_36-DXTn patchset 2019-07-04 10:38:41 +10:00
Alistair Leslie-Hughes
ca8ae3e929 Rebase against 436fb03a87ae6dcbbbe149e401942b7eb8369f51 2019-07-03 09:33:31 +10:00
Alistair Leslie-Hughes
c08046e1cc Rebase against 95be042be3f116db38eb4a255c2667a6b46fcc1e 2019-07-02 08:32:28 +10:00
Alistair Leslie-Hughes
53dad92c83 Added loader-KeyboardLayouts patchset 2019-07-01 10:41:41 +10:00
Alistair Leslie-Hughes
82c59d7eca Added user32-LoadKeyboardLayoutEx patchset 2019-07-01 09:19:46 +10:00
Alistair Leslie-Hughes
507cb29933 Added kernel32-SetProcessDEPPolicy patchset 2019-07-01 08:26:17 +10:00
Alistair Leslie-Hughes
dff74f4169 Added wined3d-unset-flip-gdi patchset 2019-07-01 08:25:21 +10:00
Alistair Leslie-Hughes
292e3c87d9 Added shlwapi-UrlCanonicalize patchset 2019-07-01 08:25:04 +10:00
Alistair Leslie-Hughes
fbb8eac819 Rebase against 90a1e5d943724f8cb5e51fe806cb38ce6c98c4c1 2019-06-28 19:46:18 +10:00
Alistair Leslie-Hughes
41d6d5f39a Updated wined3d-SWVP-shaders patchset 2019-06-28 19:32:50 +10:00
Alistair Leslie-Hughes
ca67426420 Rebase against 6d417f7890ee94dd17acc18eb2ef81f152dd0ed0 2019-06-28 08:38:47 +10:00
Alistair Leslie-Hughes
3ad0475779 Rebase against 6e9746158030c4a8f876bf411e598e2b42ff1032 2019-06-27 09:06:23 +10:00
Alistair Leslie-Hughes
fad0c725ae Rebase against 887a57fadd00b39b266b421fe1a04ab09e0d917d 2019-06-26 12:57:43 +10:00
Alistair Leslie-Hughes
be41345d31 Rebase against d83b71ebfdfe83704c313d7c11e8c87c9a8b0419 2019-06-25 08:22:06 +10:00
Alistair Leslie-Hughes
e6f1cafdd8 Release v4.11 2019-06-22 11:32:30 +10:00
Alistair Leslie-Hughes
79ed5e86aa Rebase against 07afb240a87d097c83ca5263c61145a170894a22 2019-06-22 11:06:58 +10:00
Alistair Leslie-Hughes
3bba693408 Added mshtml-TranslateAccelerator patchset 2019-06-21 11:01:13 +10:00
Alistair Leslie-Hughes
be5814e428 Rebase against cce8074aa9fb2191faba25ce7fd24e2678d3bd17 2019-06-21 09:51:08 +10:00
Alistair Leslie-Hughes
ed630b8146 Updated kernel32-PE_Loader_Fixes patchset
Thanks Paul.
2019-06-20 09:10:31 +10:00
Alistair Leslie-Hughes
11194ea339 Rebase against 48f93bc3290596b8da4455496fa88cd13ea6f3c9 2019-06-20 08:28:26 +10:00
Alistair Leslie-Hughes
694f513d71 Rebase against 1bc9c4fdb2e6c2762105c14cdafb7d4ea3370625 2019-06-19 21:05:55 +10:00
Alistair Leslie-Hughes
b5055c0b1b Rebase against 4aa7fbe0561e6a27f098a05a63c5a7d12397e678 2019-06-18 09:07:13 +10:00
Alistair Leslie-Hughes
e07b0fa042 Disabled setupapi-Display_Device patchset
This patchset need to be revisited since it causing a stack
overflow after the improved EnumDisplayDevicesW patches
were accepted.
2019-06-14 19:22:45 +10:00
Alistair Leslie-Hughes
e7110e5153 Rebase against c13351c05af43aa542938e0c0935b154a8166905 2019-06-14 09:36:53 +10:00
Alistair Leslie-Hughes
e2fa6bd9c0 Rebase against 83ca9a95de80083d906a2aeb5d1e5ca2ed611199 2019-06-12 08:31:14 +10:00
Alistair Leslie-Hughes
ed9681d9df Release v4.10 2019-06-11 09:23:11 +10:00
Alistair Leslie-Hughes
1196bcb86b Updated wined3d-SWVP-shaders patchset 2019-06-11 09:19:17 +10:00
Alistair Leslie-Hughes
9afb244a8e Rebase against 78f74446b9806f63a27c2d643b8e29156b5bdcbe 2019-06-11 09:17:17 +10:00
Alistair Leslie-Hughes
5681cd5466 Added dinput-SetActionMap-genre patchset 2019-06-07 11:33:47 +10:00
Alistair Leslie-Hughes
1d3c799e6f Added ntdll-ext4-case-folder patchset 2019-06-07 10:53:43 +10:00
Alistair Leslie-Hughes
a49aa40ac8 Rebase against 48a74277f5f9e0c87d8c01457236a89d94cb71d3 2019-06-07 08:52:10 +10:00
Alistair Leslie-Hughes
1998c0570d Rebase against 4d5c874f42e27ac992f361c71490985d7553571a 2019-06-06 08:56:13 +10:00
Alistair Leslie-Hughes
245fc7913d Updated wined3d-Dual_Source_Blending patchset
Fixes a regression introduced in 3287f0fc9b
2019-06-05 10:23:45 +10:00
Alistair Leslie-Hughes
a1afc6f151 Rebase against 7d77d330a5b60be918dbf17d9d9ca357d93bff29 2019-06-05 09:35:37 +10:00
Alistair Leslie-Hughes
3287f0fc9b Rebase against c92fddae8661233e7699e1914987f0cc4caa8217 2019-06-04 09:10:22 +10:00
Alistair Leslie-Hughes
671295089e Updated user32-msgbox-Support-WM_COPY-mesg patchset
Thanks Gabriel Ivăncescu
2019-06-01 14:50:56 +10:00
Zebediah Figura
197e08b441 Rebase against 1d9a3f6d12322891a2af4aadd66a92ea66479233. 2019-05-30 22:27:25 -05:00
Alistair Leslie-Hughes
cd1862609a Updated tdll-Junction_Points patchset 2019-05-30 11:43:08 +10:00
Alistair Leslie-Hughes
8725e273cc Rebase against 6d05fae6f7ebab83a2f1c6621d9619bbe91833fd 2019-05-29 09:41:06 +10:00
Alistair Leslie-Hughes
b9204d93c9 Rebase against 3139727a97a91b91e74d57ec97a8c19b0093b68e 2019-05-28 08:31:07 +10:00
Alistair Leslie-Hughes
e1259ef094 Drop ddraw-Fix_Typos patchset
This is never going to accepted upstream and doesn't add
any benifit to staging.
2019-05-27 10:52:34 +10:00
Alistair Leslie-Hughes
bccec28691 Drop wined3d-Restore-DirectX10-Support patchset
The nVidia Legacy driver hasn't been updated in nearly a year
and is unlikely to see another update.

Use the nouveau driver.
2019-05-27 10:42:34 +10:00
Alistair Leslie-Hughes
f25c0ce411 Updated libs-Debug_Channel patchset
Thanks Derek Lesho.
2019-05-27 09:32:00 +10:00
Alistair Leslie-Hughes
7fd92efae8 Release v4.9 2019-05-26 10:26:29 +10:00
Zebediah Figura
968a9068f4 winebuild-Fake_Dlls: Also change fake DLL syscall thunks.
Thanks to Andrew Wesie.
2019-05-25 15:17:50 -05:00
Zebediah Figura
5e5b163eba winebuild-Fake_Dlls: another fixup
user_shared_data_init() copies the internal data to the external data, but at the same time kernel32 makes calls down to ntdll before this happens, so we need both of these.
2019-05-25 11:44:35 -05:00
Zebediah Figura
5bc08f5e70 winebuild-Fake_Dlls: fixup 2019-05-25 00:04:40 -05:00
Zebediah Figura
eb91fab43e ntdll-Junction_Points: Fix for bug 47169.
From Erich E. Hoover.
2019-05-24 19:29:03 -05:00
Zebediah Figura
5b59788752 winebuild-Fake_Dlls: Change layout of system call thunks.
Based on patches by Fabian Maurer.
2019-05-24 19:20:28 -05:00
Alistair Leslie-Hughes
5634d119e0 Rebase against 27bf52d12c0eb13ec797a5d81177954faac00fa4 2019-05-24 08:57:32 +10:00
Alistair Leslie-Hughes
52f92a42de Rebase against 9cfe6094773929d9dd61db51da094324337ecab0 2019-05-23 09:01:49 +10:00
Alistair Leslie-Hughes
6f185a694c Rebase against 6a610a325809d47f48bc72f3a757e1a62b193ea8 2019-05-22 08:24:22 +10:00
Alistair Leslie-Hughes
0bb3121273 Updated bcrypt-BCryptSecretAgreement patchset 2019-05-21 08:47:26 +10:00
Alistair Leslie-Hughes
77619384a4 Rebase against 21ae9ba1ba8ddba3ba49e916ef2b7fbd5ae9713d 2019-05-21 08:40:13 +10:00
Zebediah Figura
77ef8ff7ef Rebase against 61aea5a9879f41224022d4775cce28d28618ea89. 2019-05-17 16:51:57 -05:00
Alistair Leslie-Hughes
831b1f895e Updated include-macos-compile patchset 2019-05-17 10:45:44 +10:00
Alistair Leslie-Hughes
071fe01910 Rebase against 07e249e431c5009fa6ab8d274b4a8fe62a286358 2019-05-17 09:18:43 +10:00
Alistair Leslie-Hughes
1b7ebd3bb8 Rebase against 042e0625695a82aa71ddf825c693680d5d8aa0dd 2019-05-16 09:08:56 +10:00
Alistair Leslie-Hughes
6ce73c283d Rebase against 99114803b80f6e687f1d4ed11e0808b821cdbf22 2019-05-15 09:26:21 +10:00
Alistair Leslie-Hughes
f3e2363b52 Rebase against 40fef0fb71b079c1bf9667d80384cc43ec7f11fd 2019-05-14 08:20:42 +10:00
Alistair Leslie-Hughes
6e49a945cf Added comctl32-alpha-bitmaps patchset 2019-05-13 08:24:17 +10:00
Alistair Leslie-Hughes
92cc7818b2 Updated ntdll-Junction_Points patchset 2019-05-13 08:21:41 +10:00
186 changed files with 3933 additions and 5143 deletions

View File

@@ -1,25 +0,0 @@
From bd48f0d6b1476a77520f0bf5f82ac08e9dbf9acd Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Tue, 22 Mar 2016 21:54:01 +0100
Subject: amstream: Avoid implicit cast of interface pointer.
---
dlls/amstream/mediastreamfilter.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/amstream/mediastreamfilter.c b/dlls/amstream/mediastreamfilter.c
index 5abcb2f..a7ff6e8 100644
--- a/dlls/amstream/mediastreamfilter.c
+++ b/dlls/amstream/mediastreamfilter.c
@@ -42,7 +42,7 @@ typedef struct {
static inline IMediaStreamFilterImpl *impl_from_IMediaStreamFilter(IMediaStreamFilter *iface)
{
- return CONTAINING_RECORD(iface, IMediaStreamFilterImpl, filter);
+ return CONTAINING_RECORD((IBaseFilter *)iface, IMediaStreamFilterImpl, filter.IBaseFilter_iface);
}
/*** IUnknown methods ***/
--
2.7.4

View File

@@ -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

View File

@@ -1,25 +0,0 @@
From b4586e37df817f205c8bebe319b4765dea5c62d5 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 24 Sep 2017 19:21:06 +0200
Subject: evr: Avoid implicit cast of interface pointer.
---
dlls/evr/evr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/evr/evr.c b/dlls/evr/evr.c
index c2d2933211e..5533f38a649 100644
--- a/dlls/evr/evr.c
+++ b/dlls/evr/evr.c
@@ -136,7 +136,7 @@ static const IUnknownVtbl evr_inner_vtbl =
static inline evr_filter *impl_from_IBaseFilter(IBaseFilter *iface)
{
- return CONTAINING_RECORD(iface, evr_filter, filter);
+ return CONTAINING_RECORD(iface, evr_filter, filter.IBaseFilter_iface);
}
static HRESULT WINAPI filter_QueryInterface(IBaseFilter *iface, REFIID riid, void **ppv)
--
2.14.1

View File

@@ -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

View File

@@ -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

View File

@@ -1,26 +1,26 @@
From 7f05362e86a285551a5694e98fa9abecb99018a0 Mon Sep 17 00:00:00 2001
From 19efcf925a49a5d7e0b82eb6e4797b0ac725f2dc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 17 Jan 2016 17:07:35 +0100
Subject: [PATCH] ext-ms-win-xaml-pal-l1-1-0: Add dll and add stub for
XamlBehaviorEnabled.
---
configure.ac | 1 +
dlls/ext-ms-win-xaml-pal-l1-1-0/Makefile.in | 4 +++
.../ext-ms-win-xaml-pal-l1-1-0.spec | 6 ++++
dlls/ext-ms-win-xaml-pal-l1-1-0/main.c | 35 +++++++++++++++++++
configure.ac | 1 +
dlls/ext-ms-win-xaml-pal-l1-1-0/Makefile.in | 4 +++
.../ext-ms-win-xaml-pal-l1-1-0.spec | 6 ++++
dlls/ext-ms-win-xaml-pal-l1-1-0/main.c | 35 ++++++++++++++++++++++
4 files changed, 46 insertions(+)
create mode 100644 dlls/ext-ms-win-xaml-pal-l1-1-0/Makefile.in
create mode 100644 dlls/ext-ms-win-xaml-pal-l1-1-0/ext-ms-win-xaml-pal-l1-1-0.spec
create mode 100644 dlls/ext-ms-win-xaml-pal-l1-1-0/main.c
diff --git a/configure.ac b/configure.ac
index 420f6311db3..30718491bb8 100644
index 8484c83..a9b51d2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3289,6 +3289,7 @@ WINE_CONFIG_MAKEFILE(dlls/ext-ms-win-rtcore-ntuser-sysparams-l1-1-0)
WINE_CONFIG_MAKEFILE(dlls/ext-ms-win-security-credui-l1-1-0)
WINE_CONFIG_MAKEFILE(dlls/ext-ms-win-security-cryptui-l1-1-0)
@@ -3255,6 +3255,7 @@ WINE_CONFIG_MAKEFILE(dlls/ext-ms-win-shell-comctl32-init-l1-1-0)
WINE_CONFIG_MAKEFILE(dlls/ext-ms-win-shell-comdlg32-l1-1-0)
WINE_CONFIG_MAKEFILE(dlls/ext-ms-win-shell-shell32-l1-2-0)
WINE_CONFIG_MAKEFILE(dlls/ext-ms-win-uxtheme-themes-l1-1-0)
+WINE_CONFIG_MAKEFILE(dlls/ext-ms-win-xaml-pal-l1-1-0)
WINE_CONFIG_MAKEFILE(dlls/faultrep)
@@ -28,7 +28,7 @@ index 420f6311db3..30718491bb8 100644
WINE_CONFIG_MAKEFILE(dlls/feclient)
diff --git a/dlls/ext-ms-win-xaml-pal-l1-1-0/Makefile.in b/dlls/ext-ms-win-xaml-pal-l1-1-0/Makefile.in
new file mode 100644
index 00000000000..6382d85272b
index 0000000..6382d85
--- /dev/null
+++ b/dlls/ext-ms-win-xaml-pal-l1-1-0/Makefile.in
@@ -0,0 +1,4 @@
@@ -38,7 +38,7 @@ index 00000000000..6382d85272b
+ main.c
diff --git a/dlls/ext-ms-win-xaml-pal-l1-1-0/ext-ms-win-xaml-pal-l1-1-0.spec b/dlls/ext-ms-win-xaml-pal-l1-1-0/ext-ms-win-xaml-pal-l1-1-0.spec
new file mode 100644
index 00000000000..c167f5e753e
index 0000000..c167f5e
--- /dev/null
+++ b/dlls/ext-ms-win-xaml-pal-l1-1-0/ext-ms-win-xaml-pal-l1-1-0.spec
@@ -0,0 +1,6 @@
@@ -50,7 +50,7 @@ index 00000000000..c167f5e753e
+@ stub XamlPalUninitialize
diff --git a/dlls/ext-ms-win-xaml-pal-l1-1-0/main.c b/dlls/ext-ms-win-xaml-pal-l1-1-0/main.c
new file mode 100644
index 00000000000..3e282758f41
index 0000000..3e28275
--- /dev/null
+++ b/dlls/ext-ms-win-xaml-pal-l1-1-0/main.c
@@ -0,0 +1,35 @@
@@ -90,5 +90,5 @@ index 00000000000..3e282758f41
+ return TRUE;
+}
--
2.17.0
1.9.1

View File

@@ -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

View File

@@ -1,91 +0,0 @@
From 72d00367b9863fd84d47623b6811552e155fca84 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Tue, 5 Feb 2019 10:00:26 +1100
Subject: [PATCH] bcrypt: Add BCryptDestroySecret/BCryptSecretAgreement stubs
---
dlls/bcrypt/bcrypt.spec | 4 ++--
dlls/bcrypt/bcrypt_main.c | 16 ++++++++++++++++
include/bcrypt.h | 3 +++
3 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/dlls/bcrypt/bcrypt.spec b/dlls/bcrypt/bcrypt.spec
index 052a099..dfe08e7 100644
--- a/dlls/bcrypt/bcrypt.spec
+++ b/dlls/bcrypt/bcrypt.spec
@@ -11,7 +11,7 @@
@ stdcall BCryptDeriveKeyPBKDF2(ptr ptr long ptr long int64 ptr long long)
@ stdcall BCryptDestroyHash(ptr)
@ stdcall BCryptDestroyKey(ptr)
-@ stub BCryptDestroySecret
+@ stdcall BCryptDestroySecret(ptr)
@ stdcall BCryptDuplicateHash(ptr ptr ptr long long)
@ stdcall BCryptDuplicateKey(ptr ptr ptr long long)
@ stdcall BCryptEncrypt(ptr ptr long ptr ptr long ptr long ptr long)
@@ -44,7 +44,7 @@
@ stdcall BCryptRemoveContextFunction(long wstr long wstr)
@ stdcall BCryptRemoveContextFunctionProvider(long wstr long wstr wstr)
@ stub BCryptResolveProviders
-@ stub BCryptSecretAgreement
+@ stdcall BCryptSecretAgreement(ptr ptr ptr long)
@ stub BCryptSetAuditingInterface
@ stub BCryptSetContextFunctionProperty
@ stdcall BCryptSetProperty(ptr wstr ptr long long)
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
index 80bd14b..36451c9 100644
--- a/dlls/bcrypt/bcrypt_main.c
+++ b/dlls/bcrypt/bcrypt_main.c
@@ -1556,6 +1556,22 @@ NTSTATUS WINAPI BCryptDeriveKeyPBKDF2( BCRYPT_ALG_HANDLE handle,
return STATUS_SUCCESS;
}
+NTSTATUS WINAPI BCryptSecretAgreement(BCRYPT_KEY_HANDLE handle, BCRYPT_KEY_HANDLE key, BCRYPT_SECRET_HANDLE *secret, ULONG flags)
+{
+ FIXME( "%p, %p, %p, %08x\n", handle, key, secret, flags );
+
+ if(secret)
+ *secret = (BCRYPT_SECRET_HANDLE *)0xDEADFEED;
+
+ return STATUS_SUCCESS;
+}
+
+NTSTATUS WINAPI BCryptDestroySecret(BCRYPT_SECRET_HANDLE secret)
+{
+ FIXME( "%p\n", secret );
+ return STATUS_SUCCESS;
+}
+
BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
{
switch (reason)
diff --git a/include/bcrypt.h b/include/bcrypt.h
index ba78c1d..866914c 100644
--- a/include/bcrypt.h
+++ b/include/bcrypt.h
@@ -211,6 +211,7 @@ typedef PVOID BCRYPT_ALG_HANDLE;
typedef PVOID BCRYPT_KEY_HANDLE;
typedef PVOID BCRYPT_HANDLE;
typedef PVOID BCRYPT_HASH_HANDLE;
+typedef PVOID BCRYPT_SECRET_HANDLE;
/* Flags for BCryptGenRandom */
#define BCRYPT_RNG_USE_ENTROPY_IN_BUFFER 0x00000001
@@ -228,6 +229,7 @@ NTSTATUS WINAPI BCryptDecrypt(BCRYPT_KEY_HANDLE, PUCHAR, ULONG, VOID *, PUCHAR,
NTSTATUS WINAPI BCryptDeriveKeyPBKDF2(BCRYPT_ALG_HANDLE, PUCHAR, ULONG, PUCHAR, ULONG, ULONGLONG, PUCHAR, ULONG, ULONG);
NTSTATUS WINAPI BCryptDestroyHash(BCRYPT_HASH_HANDLE);
NTSTATUS WINAPI BCryptDestroyKey(BCRYPT_KEY_HANDLE);
+NTSTATUS WINAPI BCryptDestroySecret(BCRYPT_SECRET_HANDLE);
NTSTATUS WINAPI BCryptDuplicateHash(BCRYPT_HASH_HANDLE, BCRYPT_HASH_HANDLE *, UCHAR *, ULONG, ULONG);
NTSTATUS WINAPI BCryptEncrypt(BCRYPT_KEY_HANDLE, PUCHAR, ULONG, VOID *, PUCHAR, ULONG, PUCHAR, ULONG, ULONG *, ULONG);
NTSTATUS WINAPI BCryptEnumAlgorithms(ULONG, ULONG *, BCRYPT_ALGORITHM_IDENTIFIER **, ULONG);
@@ -242,6 +244,7 @@ NTSTATUS WINAPI BCryptHash(BCRYPT_ALG_HANDLE, PUCHAR, ULONG, PUCHAR, ULONG, PUCH
NTSTATUS WINAPI BCryptHashData(BCRYPT_HASH_HANDLE, PUCHAR, ULONG, ULONG);
NTSTATUS WINAPI BCryptImportKeyPair(BCRYPT_ALG_HANDLE, BCRYPT_KEY_HANDLE, LPCWSTR, BCRYPT_KEY_HANDLE *, UCHAR *, ULONG, ULONG);
NTSTATUS WINAPI BCryptOpenAlgorithmProvider(BCRYPT_ALG_HANDLE *, LPCWSTR, LPCWSTR, ULONG);
+NTSTATUS WINAPI BCryptSecretAgreement(BCRYPT_KEY_HANDLE, BCRYPT_KEY_HANDLE, BCRYPT_SECRET_HANDLE *, ULONG);
NTSTATUS WINAPI BCryptSetProperty(BCRYPT_HANDLE, LPCWSTR, PUCHAR, ULONG, ULONG);
NTSTATUS WINAPI BCryptVerifySignature(BCRYPT_KEY_HANDLE, void *, UCHAR *, ULONG, UCHAR *, ULONG, ULONG);
--
1.9.1

View File

@@ -1,78 +0,0 @@
From 315b52406fbddcaf9289b2a47e8498fba49f8278 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Tue, 5 Feb 2019 10:09:59 +1100
Subject: [PATCH] bcrypt: Add BCryptDeriveKey stub
---
dlls/bcrypt/bcrypt.spec | 2 +-
dlls/bcrypt/bcrypt_main.c | 7 +++++++
include/bcrypt.h | 15 +++++++++++++++
3 files changed, 23 insertions(+), 1 deletion(-)
diff --git a/dlls/bcrypt/bcrypt.spec b/dlls/bcrypt/bcrypt.spec
index dfe08e7..4946ee5 100644
--- a/dlls/bcrypt/bcrypt.spec
+++ b/dlls/bcrypt/bcrypt.spec
@@ -7,7 +7,7 @@
@ stdcall BCryptCreateHash(ptr ptr ptr long ptr long long)
@ stdcall BCryptDecrypt(ptr ptr long ptr ptr long ptr long ptr long)
@ stub BCryptDeleteContext
-@ stub BCryptDeriveKey
+@ stdcall BCryptDeriveKey(ptr wstr ptr ptr long ptr long)
@ stdcall BCryptDeriveKeyPBKDF2(ptr ptr long ptr long int64 ptr long long)
@ stdcall BCryptDestroyHash(ptr)
@ stdcall BCryptDestroyKey(ptr)
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
index 36451c9..ca2f274 100644
--- a/dlls/bcrypt/bcrypt_main.c
+++ b/dlls/bcrypt/bcrypt_main.c
@@ -1572,6 +1572,13 @@ NTSTATUS WINAPI BCryptDestroySecret(BCRYPT_SECRET_HANDLE secret)
return STATUS_SUCCESS;
}
+NTSTATUS WINAPI BCryptDeriveKey(BCRYPT_SECRET_HANDLE secret, LPCWSTR kdf, BCryptBufferDesc *parameter,
+ PUCHAR derived, ULONG derived_size, ULONG *result, ULONG flags)
+{
+ FIXME( "%p, %s, %p, %p, %d, %p, %08x\n", secret, debugstr_w(kdf), parameter, derived, derived_size, result, flags );
+ return STATUS_INTERNAL_ERROR;
+}
+
BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
{
switch (reason)
diff --git a/include/bcrypt.h b/include/bcrypt.h
index 866914c..a5abf23 100644
--- a/include/bcrypt.h
+++ b/include/bcrypt.h
@@ -204,6 +204,20 @@ typedef struct _BCRYPT_KEY_DATA_BLOB_HEADER
ULONG cbKeyData;
} BCRYPT_KEY_DATA_BLOB_HEADER, *PBCRYPT_KEY_DATA_BLOB_HEADER;
+typedef struct _BCryptBuffer
+{
+ ULONG cbBuffer;
+ ULONG BufferType;
+ void *pvBuffer;
+} BCryptBuffer, *PBCryptBuffer;
+
+typedef struct _BCryptBufferDesc
+{
+ ULONG ulVersion;
+ ULONG cBuffers;
+ PBCryptBuffer pBuffers;
+} BCryptBufferDesc, *PBCryptBufferDesc;
+
#define BCRYPT_KEY_DATA_BLOB_MAGIC 0x4d42444b
#define BCRYPT_KEY_DATA_BLOB_VERSION1 1
@@ -226,6 +240,7 @@ typedef PVOID BCRYPT_SECRET_HANDLE;
NTSTATUS WINAPI BCryptCloseAlgorithmProvider(BCRYPT_ALG_HANDLE, ULONG);
NTSTATUS WINAPI BCryptCreateHash(BCRYPT_ALG_HANDLE, BCRYPT_HASH_HANDLE *, PUCHAR, ULONG, PUCHAR, ULONG, ULONG);
NTSTATUS WINAPI BCryptDecrypt(BCRYPT_KEY_HANDLE, PUCHAR, ULONG, VOID *, PUCHAR, ULONG, PUCHAR, ULONG, ULONG *, ULONG);
+NTSTATUS WINAPI BCryptDeriveKey(BCRYPT_SECRET_HANDLE, LPCWSTR, BCryptBufferDesc*, PUCHAR, ULONG, ULONG *, ULONG);
NTSTATUS WINAPI BCryptDeriveKeyPBKDF2(BCRYPT_ALG_HANDLE, PUCHAR, ULONG, PUCHAR, ULONG, ULONGLONG, PUCHAR, ULONG, ULONG);
NTSTATUS WINAPI BCryptDestroyHash(BCRYPT_HASH_HANDLE);
NTSTATUS WINAPI BCryptDestroyKey(BCRYPT_KEY_HANDLE);
--
1.9.1

View File

@@ -1 +0,0 @@
Fixes: [46564] Add BCryptDestroySecret/BCryptSecretAgreement stubs.

View File

@@ -0,0 +1,251 @@
From ebbaf56bdb75f853dafdbbffba81233784ecb618 Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Sat, 4 May 2019 18:21:05 +0800
Subject: [PATCH 1/2] comctl32: Switch to using a structure for extra storage.
Content-Type: text/plain; charset=UTF-8
To: wine-devel@winehq.org
These patches aim to fix the bug 47018.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
---
dlls/comctl32/static.c | 92 ++++++++++++++++++++++++++++++++++--------
1 file changed, 76 insertions(+), 16 deletions(-)
diff --git a/dlls/comctl32/static.c b/dlls/comctl32/static.c
index 5cc02ced97..d08710c06f 100644
--- a/dlls/comctl32/static.c
+++ b/dlls/comctl32/static.c
@@ -36,6 +36,7 @@
#include "winuser.h"
#include "commctrl.h"
+#include "wine/heap.h"
#include "wine/debug.h"
#include "comctl32.h"
@@ -50,10 +51,16 @@ static void STATIC_PaintBitmapfn( HWND hwnd, HDC hdc, DWORD style );
static void STATIC_PaintEnhMetafn( HWND hwnd, HDC hdc, DWORD style );
static void STATIC_PaintEtchedfn( HWND hwnd, HDC hdc, DWORD style );
-/* offsets for GetWindowLong for static private information */
-#define HFONT_GWL_OFFSET 0
-#define HICON_GWL_OFFSET (sizeof(HFONT))
-#define STATIC_EXTRA_BYTES (HICON_GWL_OFFSET + sizeof(HICON))
+struct static_extra_info
+{
+ HFONT hfont;
+ union
+ {
+ HICON hicon;
+ HBITMAP hbitmap;
+ HENHMETAFILE hemf;
+ } image;
+};
typedef void (*pfPaint)( HWND hwnd, HDC hdc, DWORD style );
@@ -80,6 +87,18 @@ static const pfPaint staticPaintFunc[SS_TYPEMASK+1] =
STATIC_PaintEtchedfn, /* SS_ETCHEDFRAME */
};
+static struct static_extra_info *get_extra_ptr( HWND hwnd, BOOL force )
+{
+ struct static_extra_info *extra = (struct static_extra_info *)GetWindowLongPtrW( hwnd, 0 );
+ if (!extra && force)
+ {
+ extra = heap_alloc_zero( sizeof(*extra) );
+ if (extra)
+ SetWindowLongPtrW( hwnd, 0, (ULONG_PTR)extra );
+ }
+ return extra;
+}
+
static BOOL get_icon_size( HICON handle, SIZE *size )
{
ICONINFO info;
@@ -111,6 +130,7 @@ static HICON STATIC_SetIcon( HWND hwnd, HICON hicon, DWORD style )
{
HICON prevIcon;
SIZE size;
+ struct static_extra_info *extra;
if ((style & SS_TYPEMASK) != SS_ICON) return 0;
if (hicon && !get_icon_size( hicon, &size ))
@@ -118,7 +138,12 @@ static HICON STATIC_SetIcon( HWND hwnd, HICON hicon, DWORD style )
WARN("hicon != 0, but invalid\n");
return 0;
}
- prevIcon = (HICON)SetWindowLongPtrW( hwnd, HICON_GWL_OFFSET, (LONG_PTR)hicon );
+
+ extra = get_extra_ptr( hwnd, TRUE );
+ if (!extra) return 0;
+
+ prevIcon = extra->image.hicon;
+ extra->image.hicon = hicon;
if (hicon && !(style & SS_CENTERIMAGE) && !(style & SS_REALSIZECONTROL))
{
/* Windows currently doesn't implement SS_RIGHTJUST */
@@ -146,6 +171,7 @@ static HICON STATIC_SetIcon( HWND hwnd, HICON hicon, DWORD style )
static HBITMAP STATIC_SetBitmap( HWND hwnd, HBITMAP hBitmap, DWORD style )
{
HBITMAP hOldBitmap;
+ struct static_extra_info *extra;
if ((style & SS_TYPEMASK) != SS_BITMAP) return 0;
if (hBitmap && GetObjectType(hBitmap) != OBJ_BITMAP)
@@ -153,7 +179,12 @@ static HBITMAP STATIC_SetBitmap( HWND hwnd, HBITMAP hBitmap, DWORD style )
WARN("hBitmap != 0, but it's not a bitmap\n");
return 0;
}
- hOldBitmap = (HBITMAP)SetWindowLongPtrW( hwnd, HICON_GWL_OFFSET, (LONG_PTR)hBitmap );
+
+ extra = get_extra_ptr( hwnd, TRUE );
+ if (!extra) return 0;
+
+ hOldBitmap = extra->image.hbitmap;
+ extra->image.hbitmap = hBitmap;
if (hBitmap && !(style & SS_CENTERIMAGE) && !(style & SS_REALSIZECONTROL))
{
BITMAP bm;
@@ -183,13 +214,23 @@ static HBITMAP STATIC_SetBitmap( HWND hwnd, HBITMAP hBitmap, DWORD style )
*/
static HENHMETAFILE STATIC_SetEnhMetaFile( HWND hwnd, HENHMETAFILE hEnhMetaFile, DWORD style )
{
+ HENHMETAFILE old_hemf;
+ struct static_extra_info *extra;
+
if ((style & SS_TYPEMASK) != SS_ENHMETAFILE) return 0;
if (hEnhMetaFile && GetObjectType(hEnhMetaFile) != OBJ_ENHMETAFILE)
{
WARN("hEnhMetaFile != 0, but it's not an enhanced metafile\n");
return 0;
}
- return (HENHMETAFILE)SetWindowLongPtrW( hwnd, HICON_GWL_OFFSET, (LONG_PTR)hEnhMetaFile );
+
+ extra = get_extra_ptr( hwnd, TRUE );
+ if (!extra) return 0;
+
+ old_hemf = extra->image.hemf;
+ extra->image.hemf = hEnhMetaFile;
+
+ return old_hemf;
}
/***********************************************************************
@@ -200,6 +241,8 @@ static HENHMETAFILE STATIC_SetEnhMetaFile( HWND hwnd, HENHMETAFILE hEnhMetaFile,
*/
static HANDLE STATIC_GetImage( HWND hwnd, WPARAM wParam, DWORD style )
{
+ struct static_extra_info *extra;
+
switch (style & SS_TYPEMASK)
{
case SS_ICON:
@@ -215,7 +258,22 @@ static HANDLE STATIC_GetImage( HWND hwnd, WPARAM wParam, DWORD style )
default:
return NULL;
}
- return (HANDLE)GetWindowLongPtrW( hwnd, HICON_GWL_OFFSET );
+
+ extra = get_extra_ptr( hwnd, FALSE );
+ return extra ? extra->image.hbitmap : 0;
+}
+
+static void STATIC_SetFont( HWND hwnd, HFONT hfont )
+{
+ struct static_extra_info *extra = get_extra_ptr( hwnd, TRUE );
+ if (extra)
+ extra->hfont = hfont;
+}
+
+static HFONT STATIC_GetFont( HWND hwnd )
+{
+ struct static_extra_info *extra = get_extra_ptr( hwnd, FALSE );
+ return extra ? extra->hfont : 0;
}
/***********************************************************************
@@ -327,6 +385,8 @@ static LRESULT CALLBACK STATIC_WindowProc( HWND hwnd, UINT uMsg, WPARAM wParam,
case WM_NCDESTROY:
if (style == SS_ICON)
{
+ struct static_extra_info *extra = get_extra_ptr( hwnd, FALSE );
+ heap_free( extra );
/*
* FIXME
* DestroyIcon32( STATIC_SetIcon( wndPtr, 0 ) );
@@ -423,14 +483,14 @@ static LRESULT CALLBACK STATIC_WindowProc( HWND hwnd, UINT uMsg, WPARAM wParam,
case WM_SETFONT:
if (hasTextStyle( full_style ))
{
- SetWindowLongPtrW( hwnd, HFONT_GWL_OFFSET, wParam );
+ STATIC_SetFont( hwnd, (HFONT)wParam );
if (LOWORD(lParam))
RedrawWindow( hwnd, NULL, 0, RDW_INVALIDATE | RDW_ERASE | RDW_UPDATENOW | RDW_ALLCHILDREN );
}
break;
case WM_GETFONT:
- return GetWindowLongPtrW( hwnd, HFONT_GWL_OFFSET );
+ return (LRESULT)STATIC_GetFont( hwnd );
case WM_NCHITTEST:
if (full_style & SS_NOTIFY)
@@ -508,7 +568,7 @@ static void STATIC_PaintOwnerDrawfn( HWND hwnd, HDC hdc, DWORD style )
dis.itemData = 0;
GetClientRect( hwnd, &dis.rcItem );
- font = (HFONT)GetWindowLongPtrW( hwnd, HFONT_GWL_OFFSET );
+ font = STATIC_GetFont( hwnd );
if (font) oldFont = SelectObject( hdc, font );
SendMessageW( GetParent(hwnd), WM_CTLCOLORSTATIC, (WPARAM)hdc, (LPARAM)hwnd );
SendMessageW( GetParent(hwnd), WM_DRAWITEM, id, (LPARAM)&dis );
@@ -572,7 +632,7 @@ static void STATIC_PaintTextfn( HWND hwnd, HDC hdc, DWORD style )
format |= DT_SINGLELINE | DT_WORD_ELLIPSIS;
}
- if ((hFont = (HFONT)GetWindowLongPtrW( hwnd, HFONT_GWL_OFFSET )))
+ if ((hFont = STATIC_GetFont( hwnd )))
hOldFont = SelectObject( hdc, hFont );
/* SS_SIMPLE controls: WM_CTLCOLORSTATIC is sent, but the returned
@@ -668,7 +728,7 @@ static void STATIC_PaintIconfn( HWND hwnd, HDC hdc, DWORD style )
GetClientRect( hwnd, &rc );
hbrush = STATIC_SendWmCtlColorStatic(hwnd, hdc);
- hIcon = (HICON)GetWindowLongPtrW( hwnd, HICON_GWL_OFFSET );
+ hIcon = STATIC_GetImage( hwnd, IMAGE_ICON, style );
if (!hIcon || !get_icon_size( hIcon, &size ))
{
FillRect(hdc, &rc, hbrush);
@@ -698,7 +758,7 @@ static void STATIC_PaintBitmapfn(HWND hwnd, HDC hdc, DWORD style )
hbrush = STATIC_SendWmCtlColorStatic(hwnd, hdc);
- if ((hBitmap = (HBITMAP)GetWindowLongPtrW( hwnd, HICON_GWL_OFFSET ))
+ if ((hBitmap = STATIC_GetImage( hwnd, IMAGE_BITMAP, style ))
&& (GetObjectType(hBitmap) == OBJ_BITMAP)
&& (hMemDC = CreateCompatibleDC( hdc )))
{
@@ -742,7 +802,7 @@ static void STATIC_PaintEnhMetafn(HWND hwnd, HDC hdc, DWORD style )
GetClientRect(hwnd, &rc);
hbrush = STATIC_SendWmCtlColorStatic(hwnd, hdc);
FillRect(hdc, &rc, hbrush);
- if ((hEnhMetaFile = (HENHMETAFILE)GetWindowLongPtrW( hwnd, HICON_GWL_OFFSET )))
+ if ((hEnhMetaFile = STATIC_GetImage( hwnd, IMAGE_ENHMETAFILE, style )))
{
/* The control's current font is not selected into the
device context! */
@@ -779,7 +839,7 @@ void STATIC_Register(void)
wndClass.style = CS_DBLCLKS | CS_PARENTDC | CS_GLOBALCLASS;
wndClass.lpfnWndProc = STATIC_WindowProc;
wndClass.cbClsExtra = 0;
- wndClass.cbWndExtra = STATIC_EXTRA_BYTES;
+ wndClass.cbWndExtra = sizeof(struct static_extra_info *);
wndClass.hCursor = LoadCursorW(0, (LPWSTR)IDC_ARROW);
wndClass.hbrBackground = NULL;
wndClass.lpszClassName = WC_STATICW;
--
2.20.1

View File

@@ -0,0 +1,152 @@
From 334262255a66b05a852c90ebc722815b8a0eb7e9 Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Sat, 4 May 2019 19:46:35 +0800
Subject: [PATCH 2/2] comctl32: Paint 32-bpp bitmaps with an alpha channel
using GdiAlphaBlend.
Content-Type: text/plain; charset=UTF-8
To: wine-devel@winehq.org
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
---
dlls/comctl32/static.c | 83 ++++++++++++++++++++++++++++++++++++++++--
1 file changed, 79 insertions(+), 4 deletions(-)
diff --git a/dlls/comctl32/static.c b/dlls/comctl32/static.c
index d08710c06f..fe566645d3 100644
--- a/dlls/comctl32/static.c
+++ b/dlls/comctl32/static.c
@@ -60,6 +60,7 @@ struct static_extra_info
HBITMAP hbitmap;
HENHMETAFILE hemf;
} image;
+ BOOL image_has_alpha;
};
typedef void (*pfPaint)( HWND hwnd, HDC hdc, DWORD style );
@@ -163,6 +164,56 @@ static HICON STATIC_SetIcon( HWND hwnd, HICON hicon, DWORD style )
return prevIcon;
}
+static HBITMAP create_alpha_bitmap( HBITMAP hbitmap )
+{
+ HBITMAP alpha = 0;
+ BITMAPINFO *info = NULL;
+ BITMAP bm;
+ HDC src, dst;
+ void *bits;
+ DWORD i;
+ const unsigned char *ptr;
+ BOOL has_alpha = FALSE;
+
+ if (!GetObjectW( hbitmap, sizeof(bm), &bm )) return 0;
+ if (bm.bmBitsPixel != 32) return 0;
+
+ if (!(src = CreateCompatibleDC( 0 ))) return 0;
+ if (!(dst = CreateCompatibleDC( src ))) goto done;
+ if (!(info = HeapAlloc( GetProcessHeap(), 0, FIELD_OFFSET( BITMAPINFO, bmiColors[256] )))) goto done;
+ info->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
+ info->bmiHeader.biWidth = bm.bmWidth;
+ info->bmiHeader.biHeight = -bm.bmHeight;
+ info->bmiHeader.biPlanes = 1;
+ info->bmiHeader.biBitCount = 32;
+ info->bmiHeader.biCompression = BI_RGB;
+ info->bmiHeader.biSizeImage = bm.bmWidth * bm.bmHeight * 4;
+ info->bmiHeader.biXPelsPerMeter = 0;
+ info->bmiHeader.biYPelsPerMeter = 0;
+ info->bmiHeader.biClrUsed = 0;
+ info->bmiHeader.biClrImportant = 0;
+ if (!(alpha = CreateDIBSection( dst, info, DIB_RGB_COLORS, &bits, NULL, 0 ))) goto done;
+
+ SelectObject( src, hbitmap );
+ SelectObject( dst, alpha );
+ BitBlt(dst, 0, 0, bm.bmWidth, bm.bmHeight, src, 0, 0, SRCCOPY);
+
+ for (i = 0, ptr = bits; i < bm.bmWidth * bm.bmHeight; i++, ptr += 4)
+ if ((has_alpha = (ptr[3] != 0))) break;
+
+done:
+ DeleteDC( src );
+ DeleteDC( dst );
+ HeapFree( GetProcessHeap(), 0, info );
+
+ if (!has_alpha)
+ {
+ DeleteObject( alpha );
+ alpha = 0;
+ }
+ return alpha;
+}
+
/***********************************************************************
* STATIC_SetBitmap
*
@@ -170,7 +221,7 @@ static HICON STATIC_SetIcon( HWND hwnd, HICON hicon, DWORD style )
*/
static HBITMAP STATIC_SetBitmap( HWND hwnd, HBITMAP hBitmap, DWORD style )
{
- HBITMAP hOldBitmap;
+ HBITMAP hOldBitmap, alpha;
struct static_extra_info *extra;
if ((style & SS_TYPEMASK) != SS_BITMAP) return 0;
@@ -184,7 +235,18 @@ static HBITMAP STATIC_SetBitmap( HWND hwnd, HBITMAP hBitmap, DWORD style )
if (!extra) return 0;
hOldBitmap = extra->image.hbitmap;
- extra->image.hbitmap = hBitmap;
+ alpha = create_alpha_bitmap( hBitmap );
+ if (alpha)
+ {
+ extra->image.hbitmap = alpha;
+ extra->image_has_alpha = TRUE;
+ }
+ else
+ {
+ extra->image.hbitmap = hBitmap;
+ extra->image_has_alpha = FALSE;
+ }
+
if (hBitmap && !(style & SS_CENTERIMAGE) && !(style & SS_REALSIZECONTROL))
{
BITMAP bm;
@@ -386,7 +448,12 @@ static LRESULT CALLBACK STATIC_WindowProc( HWND hwnd, UINT uMsg, WPARAM wParam,
if (style == SS_ICON)
{
struct static_extra_info *extra = get_extra_ptr( hwnd, FALSE );
- heap_free( extra );
+ if (extra)
+ {
+ if (extra->image_has_alpha)
+ DeleteObject( extra->image.hbitmap );
+ heap_free( extra );
+ }
/*
* FIXME
* DestroyIcon32( STATIC_SetIcon( wndPtr, 0 ) );
@@ -765,6 +832,8 @@ static void STATIC_PaintBitmapfn(HWND hwnd, HDC hdc, DWORD style )
BITMAP bm;
RECT rcClient;
LOGBRUSH brush;
+ BLENDFUNCTION blend = { AC_SRC_OVER, 0, 255, AC_SRC_ALPHA };
+ struct static_extra_info *extra = get_extra_ptr( hwnd, FALSE );
GetObjectW(hBitmap, sizeof(bm), &bm);
oldbitmap = SelectObject(hMemDC, hBitmap);
@@ -785,7 +854,13 @@ static void STATIC_PaintBitmapfn(HWND hwnd, HDC hdc, DWORD style )
rcClient.right = rcClient.left + bm.bmWidth;
rcClient.bottom = rcClient.top + bm.bmHeight;
}
- StretchBlt(hdc, rcClient.left, rcClient.top, rcClient.right - rcClient.left,
+
+ if (extra->image_has_alpha)
+ GdiAlphaBlend(hdc, rcClient.left, rcClient.top, rcClient.right - rcClient.left,
+ rcClient.bottom - rcClient.top, hMemDC,
+ 0, 0, bm.bmWidth, bm.bmHeight, blend);
+ else
+ StretchBlt(hdc, rcClient.left, rcClient.top, rcClient.right - rcClient.left,
rcClient.bottom - rcClient.top, hMemDC,
0, 0, bm.bmWidth, bm.bmHeight, SRCCOPY);
SelectObject(hMemDC, oldbitmap);
--
2.20.1

View File

@@ -0,0 +1 @@
Fixes: [47018] Paint 32-bpp bitmaps with an alpha channel using GdiAlphaBlend

View File

@@ -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

View File

@@ -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

View File

@@ -1 +0,0 @@
Fixes: [18490] Allow to set pixel format for desktop window

View File

@@ -1,4 +1,4 @@
From fb8bd7d53bea2e6deb38994741d884eb10bc31ad Mon Sep 17 00:00:00 2001
From 27517cacf7df657e32e7ca7068c3e86723cb4a3c Mon Sep 17 00:00:00 2001
From: Christian Costa <titan.costa@gmail.com>
Date: Sat, 13 Feb 2016 15:29:37 +0100
Subject: [PATCH] d3dx9_36: Implement D3DXDisassembleShader. (v2)
@@ -6,11 +6,11 @@ Subject: [PATCH] d3dx9_36: Implement D3DXDisassembleShader. (v2)
Changes in v2 (by Christian Costa):
* More generic code for D3DXDisassembleShader.
---
dlls/d3dx9_36/shader.c | 330 ++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 328 insertions(+), 2 deletions(-)
dlls/d3dx9_36/shader.c | 331 ++++++++++++++++++++++++++++++++++++++++-
1 file changed, 328 insertions(+), 3 deletions(-)
diff --git a/dlls/d3dx9_36/shader.c b/dlls/d3dx9_36/shader.c
index f372494..01ed335 100644
index c59fc791e..79d47b95c 100644
--- a/dlls/d3dx9_36/shader.c
+++ b/dlls/d3dx9_36/shader.c
@@ -1,6 +1,7 @@
@@ -21,15 +21,16 @@ index f372494..01ed335 100644
* Copyright 2011 Travis Athougies
*
* This library is free software; you can redistribute it and/or
@@ -20,6 +21,7 @@
@@ -18,7 +19,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/port.h"
-
+#include <stdio.h>
#include "d3dx9_private.h"
#include "d3dcommon.h"
@@ -2144,10 +2146,334 @@ HRESULT WINAPI D3DXGetShaderSamplers(const DWORD *byte_code, const char **sample
#include "d3dcompiler.h"
@@ -2138,10 +2139,334 @@ HRESULT WINAPI D3DXGetShaderSamplers(const DWORD *byte_code, const char **sample
return D3D_OK;
}
@@ -367,5 +368,5 @@ index f372494..01ed335 100644
struct d3dx9_texture_shader
--
1.9.1
2.21.0

View File

@@ -1,4 +1,4 @@
From 1c46cc796a20b263f708aebf5428e59408fea200 Mon Sep 17 00:00:00 2001
From 4595b49c9c878e8a86fcd22dc82a9f5cfadfc7a8 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
@@ -17,8 +17,8 @@ Subject: [PATCH] d3dx9_36: add DXTn support
dlls/d3dx9_34/Makefile.in | 2 +-
dlls/d3dx9_35/Makefile.in | 2 +-
dlls/d3dx9_36/Makefile.in | 2 +-
dlls/d3dx9_36/surface.c | 102 ++++++++++++++++++++++++++++++++++++++----
dlls/d3dx9_36/tests/surface.c | 8 ++--
dlls/d3dx9_36/surface.c | 102 +++++++++++++++++++++++++++++++---
dlls/d3dx9_36/tests/surface.c | 8 +--
dlls/d3dx9_37/Makefile.in | 2 +-
dlls/d3dx9_38/Makefile.in | 2 +-
dlls/d3dx9_39/Makefile.in | 2 +-
@@ -29,7 +29,7 @@ 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 02e64d3..0484639 100644
index 99db5f355..0c3fb8a90 100644
--- a/dlls/d3dx9_24/Makefile.in
+++ b/dlls/d3dx9_24/Makefile.in
@@ -1,6 +1,6 @@
@@ -41,7 +41,7 @@ index 02e64d3..0484639 100644
DELAYIMPORTS = windowscodecs
diff --git a/dlls/d3dx9_25/Makefile.in b/dlls/d3dx9_25/Makefile.in
index 57ed1da..3461967 100644
index 9e54aba2c..4419b18b8 100644
--- a/dlls/d3dx9_25/Makefile.in
+++ b/dlls/d3dx9_25/Makefile.in
@@ -1,6 +1,6 @@
@@ -53,7 +53,7 @@ index 57ed1da..3461967 100644
DELAYIMPORTS = windowscodecs
diff --git a/dlls/d3dx9_26/Makefile.in b/dlls/d3dx9_26/Makefile.in
index 04d9ba4..291daf3 100644
index 104f7c19b..cfc9711ef 100644
--- a/dlls/d3dx9_26/Makefile.in
+++ b/dlls/d3dx9_26/Makefile.in
@@ -1,6 +1,6 @@
@@ -65,7 +65,7 @@ index 04d9ba4..291daf3 100644
DELAYIMPORTS = windowscodecs
diff --git a/dlls/d3dx9_27/Makefile.in b/dlls/d3dx9_27/Makefile.in
index faec9b2..5a52b60 100644
index db04c8310..d598c9bbf 100644
--- a/dlls/d3dx9_27/Makefile.in
+++ b/dlls/d3dx9_27/Makefile.in
@@ -1,6 +1,6 @@
@@ -77,7 +77,7 @@ index faec9b2..5a52b60 100644
DELAYIMPORTS = windowscodecs
diff --git a/dlls/d3dx9_28/Makefile.in b/dlls/d3dx9_28/Makefile.in
index b8aad93..8eecbc0 100644
index 8a2b9c690..8e9979092 100644
--- a/dlls/d3dx9_28/Makefile.in
+++ b/dlls/d3dx9_28/Makefile.in
@@ -1,6 +1,6 @@
@@ -89,7 +89,7 @@ index b8aad93..8eecbc0 100644
DELAYIMPORTS = windowscodecs
diff --git a/dlls/d3dx9_29/Makefile.in b/dlls/d3dx9_29/Makefile.in
index 29c76c4..0299369 100644
index 6e1f45c02..efe538fde 100644
--- a/dlls/d3dx9_29/Makefile.in
+++ b/dlls/d3dx9_29/Makefile.in
@@ -1,6 +1,6 @@
@@ -101,7 +101,7 @@ index 29c76c4..0299369 100644
DELAYIMPORTS = windowscodecs
diff --git a/dlls/d3dx9_30/Makefile.in b/dlls/d3dx9_30/Makefile.in
index 810edc9..7bdc074 100644
index 092a6b154..4a1ee6304 100644
--- a/dlls/d3dx9_30/Makefile.in
+++ b/dlls/d3dx9_30/Makefile.in
@@ -1,6 +1,6 @@
@@ -113,7 +113,7 @@ index 810edc9..7bdc074 100644
DELAYIMPORTS = windowscodecs
diff --git a/dlls/d3dx9_31/Makefile.in b/dlls/d3dx9_31/Makefile.in
index fce2b53..0ef9c91 100644
index 48c67e6e0..dcbb7a01b 100644
--- a/dlls/d3dx9_31/Makefile.in
+++ b/dlls/d3dx9_31/Makefile.in
@@ -1,6 +1,6 @@
@@ -125,7 +125,7 @@ index fce2b53..0ef9c91 100644
DELAYIMPORTS = windowscodecs
diff --git a/dlls/d3dx9_32/Makefile.in b/dlls/d3dx9_32/Makefile.in
index ad53b26..25e2a1c 100644
index d51d6a0db..fb89ea7c2 100644
--- a/dlls/d3dx9_32/Makefile.in
+++ b/dlls/d3dx9_32/Makefile.in
@@ -1,6 +1,6 @@
@@ -137,7 +137,7 @@ index ad53b26..25e2a1c 100644
DELAYIMPORTS = windowscodecs
diff --git a/dlls/d3dx9_33/Makefile.in b/dlls/d3dx9_33/Makefile.in
index 318ddce..a6ec6db 100644
index 52cdde13a..487255e43 100644
--- a/dlls/d3dx9_33/Makefile.in
+++ b/dlls/d3dx9_33/Makefile.in
@@ -1,6 +1,6 @@
@@ -149,7 +149,7 @@ index 318ddce..a6ec6db 100644
DELAYIMPORTS = windowscodecs
diff --git a/dlls/d3dx9_34/Makefile.in b/dlls/d3dx9_34/Makefile.in
index 451a371..ff79b58 100644
index 37f431228..9b0b500f7 100644
--- a/dlls/d3dx9_34/Makefile.in
+++ b/dlls/d3dx9_34/Makefile.in
@@ -1,6 +1,6 @@
@@ -161,7 +161,7 @@ index 451a371..ff79b58 100644
DELAYIMPORTS = windowscodecs
diff --git a/dlls/d3dx9_35/Makefile.in b/dlls/d3dx9_35/Makefile.in
index 978d0b0..aa8ea65 100644
index 4441b5f6e..ac4291359 100644
--- a/dlls/d3dx9_35/Makefile.in
+++ b/dlls/d3dx9_35/Makefile.in
@@ -1,6 +1,6 @@
@@ -173,7 +173,7 @@ index 978d0b0..aa8ea65 100644
DELAYIMPORTS = windowscodecs
diff --git a/dlls/d3dx9_36/Makefile.in b/dlls/d3dx9_36/Makefile.in
index 847edec..1427571 100644
index 5e76ab7f5..c95dc0707 100644
--- a/dlls/d3dx9_36/Makefile.in
+++ b/dlls/d3dx9_36/Makefile.in
@@ -1,7 +1,7 @@
@@ -184,12 +184,12 @@ index 847edec..1427571 100644
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 wined3d
DELAYIMPORTS = windowscodecs
C_SRCS = \
EXTRADLLFLAGS = -mno-cygwin
diff --git a/dlls/d3dx9_36/surface.c b/dlls/d3dx9_36/surface.c
index d236feb..3c308d3 100644
index 57d9818cd..f05bad5ab 100644
--- a/dlls/d3dx9_36/surface.c
+++ b/dlls/d3dx9_36/surface.c
@@ -27,6 +27,8 @@
@@ -25,6 +25,8 @@
#include "ole2.h"
#include "wincodec.h"
@@ -198,12 +198,12 @@ index d236feb..3c308d3 100644
WINE_DEFAULT_DEBUG_CHANNEL(d3dx);
HRESULT WINAPI WICCreateImagingFactory_Proxy(UINT, IWICImagingFactory**);
@@ -1876,6 +1878,24 @@ void point_filter_argb_pixels(const BYTE *src, UINT src_row_pitch, UINT src_slic
@@ -1772,6 +1774,24 @@ void point_filter_argb_pixels(const BYTE *src, UINT src_row_pitch, UINT src_slic
}
}
+typedef BOOL (*dxtn_conversion_func)(const BYTE *src, BYTE *dst, DWORD pitch_in, DWORD pitch_out,
+ enum wined3d_format_id format, unsigned int w, unsigned int h);
+typedef BOOL (__cdecl *dxtn_conversion_func)(const BYTE *src, BYTE *dst, DWORD pitch_in, DWORD pitch_out,
+ enum wined3d_format_id format, unsigned int w, unsigned int h);
+
+static dxtn_conversion_func get_dxtn_conversion_func(D3DFORMAT format, BOOL encode)
+{
@@ -223,7 +223,7 @@ index d236feb..3c308d3 100644
/************************************************************
* D3DXLoadSurfaceFromMemory
*
@@ -1915,10 +1935,12 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface,
@@ -1811,10 +1831,12 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface,
{
const struct pixel_format_desc *srcformatdesc, *destformatdesc;
IDirect3DSurface9 *surface;
@@ -237,7 +237,7 @@ index d236feb..3c308d3 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,
@@ -1999,18 +2021,65 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface,
@@ -1895,18 +1917,65 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface,
}
else /* Stretching or format conversion. */
{
@@ -307,7 +307,7 @@ index d236feb..3c308d3 100644
}
else /* if ((filter & 0xf) == D3DX_FILTER_POINT) */
{
@@ -2019,12 +2088,29 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface,
@@ -1915,12 +1984,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. */
@@ -341,10 +341,10 @@ index d236feb..3c308d3 100644
/************************************************************
diff --git a/dlls/d3dx9_36/tests/surface.c b/dlls/d3dx9_36/tests/surface.c
index 2c83dc2..95b64a0 100644
index 56b79d80c..8614cec4c 100644
--- a/dlls/d3dx9_36/tests/surface.c
+++ b/dlls/d3dx9_36/tests/surface.c
@@ -1224,7 +1224,7 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
@@ -1225,7 +1225,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 2c83dc2..95b64a0 100644
check_release((IUnknown*)newsurf, 1);
check_release((IUnknown*)tex, 0);
}
@@ -1250,7 +1250,7 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
@@ -1251,7 +1251,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 2c83dc2..95b64a0 100644
check_release((IUnknown*)newsurf, 1);
check_release((IUnknown*)tex, 0);
}
@@ -1263,10 +1263,10 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
@@ -1264,10 +1264,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,7 +376,7 @@ index 2c83dc2..95b64a0 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 a05068c..e5b29d3 100644
index ea0a04807..a710cef03 100644
--- a/dlls/d3dx9_37/Makefile.in
+++ b/dlls/d3dx9_37/Makefile.in
@@ -1,6 +1,6 @@
@@ -388,7 +388,7 @@ index a05068c..e5b29d3 100644
DELAYIMPORTS = windowscodecs
diff --git a/dlls/d3dx9_38/Makefile.in b/dlls/d3dx9_38/Makefile.in
index b092e62..0a37204 100644
index af62f823d..543a482af 100644
--- a/dlls/d3dx9_38/Makefile.in
+++ b/dlls/d3dx9_38/Makefile.in
@@ -1,6 +1,6 @@
@@ -400,7 +400,7 @@ index b092e62..0a37204 100644
DELAYIMPORTS = windowscodecs
diff --git a/dlls/d3dx9_39/Makefile.in b/dlls/d3dx9_39/Makefile.in
index 4d17120..d0e2cc9 100644
index ab71712d4..cacb0c00d 100644
--- a/dlls/d3dx9_39/Makefile.in
+++ b/dlls/d3dx9_39/Makefile.in
@@ -1,6 +1,6 @@
@@ -412,7 +412,7 @@ index 4d17120..d0e2cc9 100644
DELAYIMPORTS = windowscodecs
diff --git a/dlls/d3dx9_40/Makefile.in b/dlls/d3dx9_40/Makefile.in
index 59f6f3d..0a0d36b 100644
index 76428d2fd..a58a99ef2 100644
--- a/dlls/d3dx9_40/Makefile.in
+++ b/dlls/d3dx9_40/Makefile.in
@@ -1,6 +1,6 @@
@@ -424,7 +424,7 @@ index 59f6f3d..0a0d36b 100644
DELAYIMPORTS = windowscodecs
diff --git a/dlls/d3dx9_41/Makefile.in b/dlls/d3dx9_41/Makefile.in
index f18443a..f477a20 100644
index d3647f895..93fb6b508 100644
--- a/dlls/d3dx9_41/Makefile.in
+++ b/dlls/d3dx9_41/Makefile.in
@@ -1,6 +1,6 @@
@@ -436,7 +436,7 @@ index f18443a..f477a20 100644
DELAYIMPORTS = windowscodecs
diff --git a/dlls/d3dx9_42/Makefile.in b/dlls/d3dx9_42/Makefile.in
index cb142b7..4d93a84 100644
index 88bd746da..197d0d45b 100644
--- a/dlls/d3dx9_42/Makefile.in
+++ b/dlls/d3dx9_42/Makefile.in
@@ -1,6 +1,6 @@
@@ -448,7 +448,7 @@ index cb142b7..4d93a84 100644
DELAYIMPORTS = windowscodecs
diff --git a/dlls/d3dx9_43/Makefile.in b/dlls/d3dx9_43/Makefile.in
index 3e6111a..5812d03 100644
index 2f6b8634a..17895954a 100644
--- a/dlls/d3dx9_43/Makefile.in
+++ b/dlls/d3dx9_43/Makefile.in
@@ -1,6 +1,6 @@
@@ -460,5 +460,5 @@ index 3e6111a..5812d03 100644
DELAYIMPORTS = windowscodecs
--
1.9.1
2.21.0

View File

@@ -1,7 +1,7 @@
From f466d59e3eca3c1fd120203d01a746761f301207 Mon Sep 17 00:00:00 2001
From e920f461eaf4c5d19c0cfc8e9c9a40671269dd93 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Mon, 6 Oct 2014 05:06:06 +0200
Subject: dbghelp: Always check for debug symbols in BINDIR.
Subject: [PATCH] dbghelp: Always check for debug symbols in BINDIR.
---
dlls/dbghelp/Makefile.in | 2 +-
@@ -9,7 +9,7 @@ Subject: dbghelp: Always check for debug symbols in BINDIR.
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/dlls/dbghelp/Makefile.in b/dlls/dbghelp/Makefile.in
index 3e120e8afe9..6746ca7dbd9 100644
index f08464cd422..aa7a767110b 100644
--- a/dlls/dbghelp/Makefile.in
+++ b/dlls/dbghelp/Makefile.in
@@ -1,6 +1,6 @@
@@ -18,13 +18,13 @@ index 3e120e8afe9..6746ca7dbd9 100644
-EXTRADEFS = -D_IMAGEHLP_SOURCE_
+EXTRADEFS = -D_IMAGEHLP_SOURCE_ -DBINDIR="\"${bindir}\""
DELAYIMPORTS = version
EXTRAINCL = $(Z_CFLAGS)
EXTRALIBS = $(Z_LIBS) $(CORESERVICES_LIBS) $(COREFOUNDATION_LIBS)
diff --git a/dlls/dbghelp/elf_module.c b/dlls/dbghelp/elf_module.c
index 6428955941c..75c0a4c2453 100644
index 96b16fd5c0c..611533ee098 100644
--- a/dlls/dbghelp/elf_module.c
+++ b/dlls/dbghelp/elf_module.c
@@ -1486,9 +1486,11 @@ static BOOL elf_search_and_load_file(struct process* pcs, const WCHAR* filename,
@@ -1644,9 +1644,11 @@ static BOOL elf_search_and_load_file(struct process* pcs, const WCHAR* filename,
if (!ret && !strchrW(filename, '/'))
{
ret = elf_load_file_from_path(pcs, filename, load_offset, dyn_addr,
@@ -40,5 +40,5 @@ index 6428955941c..75c0a4c2453 100644
load_offset, dyn_addr, elf_info);
}
--
2.11.0
2.20.1

View File

@@ -1,17 +1,17 @@
From 64f08bf065be9b766dce1c52a0be260dc1e26679 Mon Sep 17 00:00:00 2001
From 826f68ed53563b81d225b49131bbd3595c6d885b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 6 Sep 2015 20:21:42 +0200
Subject: ddraw: Set dwZBufferBitDepth in ddraw7_GetCaps.
Subject: [PATCH] ddraw: Set dwZBufferBitDepth in ddraw7_GetCaps.
---
dlls/ddraw/ddraw.c | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c
index c94bfee..77a1bea 100644
index 8d608656143..cc8adccf049 100644
--- a/dlls/ddraw/ddraw.c
+++ b/dlls/ddraw/ddraw.c
@@ -1420,6 +1420,28 @@ HRESULT ddraw_get_d3dcaps(const struct ddraw *ddraw, D3DDEVICEDESC7 *caps)
@@ -1434,6 +1434,28 @@ HRESULT ddraw_get_d3dcaps(const struct ddraw *ddraw, D3DDEVICEDESC7 *caps)
return DD_OK;
}
@@ -40,15 +40,15 @@ index c94bfee..77a1bea 100644
/*****************************************************************************
* IDirectDraw7::GetCaps
*
@@ -1500,6 +1522,8 @@ static HRESULT WINAPI ddraw7_GetCaps(IDirectDraw7 *iface, DDCAPS *DriverCaps, DD
@@ -1514,6 +1536,8 @@ static HRESULT WINAPI ddraw7_GetCaps(IDirectDraw7 *iface, DDCAPS *DriverCaps, DD
caps.dwCaps |= DDCAPS_ALIGNSTRIDE;
caps.dwAlignStrideAlign = DDRAW_STRIDE_ALIGNMENT;
+ IDirect3D7_EnumZBufferFormats(&ddraw->IDirect3D7_iface, &IID_IDirect3DHALDevice, enum_zbuffer, &caps);
+
caps.ddsOldCaps.dwCaps = caps.ddsCaps.dwCaps;
if(DriverCaps)
{
DD_STRUCT_COPY_BYSIZE(DriverCaps, &caps);
--
2.5.1
2.20.1

Some files were not shown because too many files have changed in this diff Show More