Compare commits

...

19 Commits
v9.0 ... v9.1

Author SHA1 Message Date
Alistair Leslie-Hughes
53c687fd47 Release v9.1 2024-01-27 17:30:38 +11:00
Alistair Leslie-Hughes
9c85f8e97a Updated vkd3d-latest patchset 2024-01-27 12:58:57 +11:00
Alistair Leslie-Hughes
a15917a85e Updated windows.networking.connectivity-new-dll patchset
Ran make_makefiles to update configure.ac
2024-01-27 12:32:15 +11:00
Alistair Leslie-Hughes
06139e25fa Updated fonts-Missing_Fonts patchset
run make_makefiles to fixup Makefile.in
2024-01-27 12:32:15 +11:00
Alistair Leslie-Hughes
e175b3e173 Updated vcomp_for_dynamic_init_i8 patchset
run make_specfiles to ensure all files are correct.
2024-01-27 12:32:15 +11:00
Zebediah Figura
1c14122a2d ddraw-version-check: Rebase and reënable.
Thanks to Aida JonikienÄ— for doing this rebase.
2024-01-26 18:27:53 -06:00
Zebediah Figura
92aa3c6389 wined3d-bindless-texture: Rebase and reënable.
Thanks to Aida JonikienÄ— for doing this rebase.
2024-01-26 17:58:34 -06:00
Zebediah Figura
72730e4340 user32-Mouse_Message_Hwnd: Rebase (mostly) and reënable.
The tests are left alone since they aren't particularly important and will need to be rewritten anyway.
They should probably be somewhere other than input.c, since they don't actually relate to input.
2024-01-26 17:41:53 -06:00
Zebediah Figura
065d60e3d7 Rebase against c963c4141a0d4f6601c37f11d79de186be0da6a9. 2024-01-26 17:31:02 -06:00
Zebediah Figura
fbae1b5a2c Rebase against eb5993a7c6fbc1cd9deac0dceabc8f1c76e14ba8. 2024-01-25 17:55:36 -06:00
Alistair Leslie-Hughes
4be0e7f2c6 Rebase against ab28825aceec92775fd570fc3a42c154366eceea. 2024-01-25 16:25:39 +11:00
Alistair Leslie-Hughes
e04949b586 Added scrrun_move_folder patchset 2024-01-24 13:42:41 +11:00
Alistair Leslie-Hughes
a878cd75dd Added msxml3-write_out_doc patchset 2024-01-24 13:13:27 +11:00
Alistair Leslie-Hughes
78b6fcffa8 Added msi-cabinet patchset 2024-01-24 13:12:34 +11:00
Alistair Leslie-Hughes
0419fcc658 Updated vkd3d-latest patchset 2024-01-24 12:28:57 +11:00
Alistair Leslie-Hughes
8928bbdbff Rebase against d81c4ce1ba700cca040afcf89c75c683b23e531d. 2024-01-24 10:55:59 +11:00
Zebediah Figura
034a07418d Rebase against 35ac0e7ac0511ef766f3f35220869565ce07906e. 2024-01-22 16:26:14 -06:00
Alistair Leslie-Hughes
e045af48e8 Updated vkd3d-latest patchset
Squashed afer release + rebased to latest (Added patch 0003).
2024-01-18 12:10:18 +11:00
Alistair Leslie-Hughes
19c6bb12cc Rebase against 1932c3a2516b181291ce430505dcfa8a82eb70bd. 2024-01-18 11:49:45 +11:00
54 changed files with 19070 additions and 9440 deletions

View File

@@ -1,4 +1,4 @@
From e6354103c243e13c177f6a534a9e786cfdcf7c92 Mon Sep 17 00:00:00 2001
From f48fa2ff628c3262245593301a141dee31118fd4 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Thu, 2 Oct 2014 19:44:31 +0200
Subject: [PATCH] ntdll: Print a warning message specifying the wine-staging
@@ -9,7 +9,7 @@ Subject: [PATCH] ntdll: Print a warning message specifying the wine-staging
1 file changed, 15 insertions(+)
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index 1a87f4d1f5e..31c0a3bae94 100644
index 021f7941969..68cb4b25d85 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -42,6 +42,7 @@ WINE_DECLARE_DEBUG_CHANNEL(relay);
@@ -20,7 +20,7 @@ index 1a87f4d1f5e..31c0a3bae94 100644
#ifdef _WIN64
#define DEFAULT_SECURITY_COOKIE_64 (((ULONGLONG)0x00002b99 << 32) | 0x2ddfa232)
@@ -3749,6 +3750,7 @@ void WINAPI LdrShutdownProcess(void)
@@ -3822,6 +3823,7 @@ void WINAPI LdrShutdownProcess(void)
process_detach();
}
@@ -28,7 +28,7 @@ index 1a87f4d1f5e..31c0a3bae94 100644
/******************************************************************
* RtlExitUserProcess (NTDLL.@)
@@ -4195,6 +4197,9 @@ static void release_address_space(void)
@@ -4244,6 +4246,9 @@ static void release_address_space(void)
*/
void loader_init( CONTEXT *context, void **entry )
{
@@ -37,8 +37,8 @@ index 1a87f4d1f5e..31c0a3bae94 100644
+ HANDLE staging_event;
static int attach_done;
NTSTATUS status;
ULONG_PTR cookie;
@@ -4274,6 +4279,16 @@ void loader_init( CONTEXT *context, void **entry )
ULONG_PTR cookie, port = 0;
@@ -4317,6 +4322,16 @@ void loader_init( CONTEXT *context, void **entry )
if (NtCurrentTeb()->WowTebOffset) init_wow64( context );
#endif
@@ -56,5 +56,5 @@ index 1a87f4d1f5e..31c0a3bae94 100644
InsertHeadList( &tls_links, &NtCurrentTeb()->TlsLinks );
RtlReleasePebLock();
--
2.42.0
2.43.0

View File

@@ -1,4 +1,4 @@
From f1dba65707a5a8ef5ec2d9c8213134b01cd735e2 Mon Sep 17 00:00:00 2001
From 0a5214d0fe032778fa3ca4ee60c3d2ba64f8f4c0 Mon Sep 17 00:00:00 2001
From: Matthew Wong <itsmattkc@gmail.com>
Date: Fri, 18 Sep 2020 00:47:13 +0000
Subject: [PATCH] ddraw: Implement Pick() and GetPickRecords().
@@ -33,14 +33,14 @@ Signed-off-by: Myah Caron <qsniyg@protonmail.com>
dlls/ddraw/ddraw_private.h | 7 +-
dlls/ddraw/device.c | 67 ++++++++++++--
dlls/ddraw/executebuffer.c | 176 ++++++++++++++++++++++++++++++++++++-
dlls/ddraw/tests/ddraw1.c | 131 +++++++++++++++++++++++++++
4 files changed, 371 insertions(+), 10 deletions(-)
dlls/ddraw/tests/ddraw1.c | 133 ++++++++++++++++++++++++++++
4 files changed, 373 insertions(+), 10 deletions(-)
diff --git a/dlls/ddraw/ddraw_private.h b/dlls/ddraw/ddraw_private.h
index 01a9579651c..889a64219e5 100644
index 6fc93b91860..c90b894ea61 100644
--- a/dlls/ddraw/ddraw_private.h
+++ b/dlls/ddraw/ddraw_private.h
@@ -336,6 +336,11 @@ struct d3d_device
@@ -338,6 +338,11 @@ struct d3d_device
struct d3d_viewport *current_viewport;
D3DVIEWPORT7 active_viewport;
@@ -52,7 +52,7 @@ index 01a9579651c..889a64219e5 100644
/* Required to keep track which of two available texture blending modes in d3ddevice3 is used */
BOOL legacyTextureBlending;
D3DTEXTUREBLEND texture_map_blend;
@@ -569,7 +574,7 @@ struct d3d_execute_buffer *unsafe_impl_from_IDirect3DExecuteBuffer(IDirect3DExec
@@ -571,7 +576,7 @@ struct d3d_execute_buffer *unsafe_impl_from_IDirect3DExecuteBuffer(IDirect3DExec
/* The execute function */
HRESULT d3d_execute_buffer_execute(struct d3d_execute_buffer *execute_buffer,
@@ -62,7 +62,7 @@ index 01a9579651c..889a64219e5 100644
/*****************************************************************************
* IDirect3DVertexBuffer
diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c
index 80556e96787..b3b63d7b361 100644
index bc1d91ee00b..82a813f9064 100644
--- a/dlls/ddraw/device.c
+++ b/dlls/ddraw/device.c
@@ -349,6 +349,9 @@ static ULONG WINAPI d3d_device_inner_Release(IUnknown *iface)
@@ -172,7 +172,7 @@ index 80556e96787..b3b63d7b361 100644
return D3D_OK;
}
diff --git a/dlls/ddraw/executebuffer.c b/dlls/ddraw/executebuffer.c
index 13e639eda3f..bb050fe16b8 100644
index 320ce6649d4..84366dafd7d 100644
--- a/dlls/ddraw/executebuffer.c
+++ b/dlls/ddraw/executebuffer.c
@@ -45,15 +45,106 @@ static void _dump_D3DEXECUTEBUFFERDESC(const D3DEXECUTEBUFFERDESC *lpDesc) {
@@ -387,10 +387,10 @@ index 13e639eda3f..bb050fe16b8 100644
static inline struct d3d_execute_buffer *impl_from_IDirect3DExecuteBuffer(IDirect3DExecuteBuffer *iface)
{
diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c
index f5fc7b04053..b6374e75632 100644
index d8fcb188c40..bacd9049d6e 100644
--- a/dlls/ddraw/tests/ddraw1.c
+++ b/dlls/ddraw/tests/ddraw1.c
@@ -15429,6 +15429,136 @@ static void test_enum_devices(void)
@@ -15467,6 +15467,137 @@ static void test_enum_devices(void)
ok(!refcount, "Device has %lu references left.\n", refcount);
}
@@ -521,13 +521,22 @@ index f5fc7b04053..b6374e75632 100644
+ IDirect3DExecuteBuffer_Release(execute_buffer);
+ IDirect3DDevice_Release(device);
+ IDirectDraw_Release(ddraw);
+
+ DestroyWindow(window);
+}
+
START_TEST(ddraw1)
{
DDDEVICEIDENTIFIER identifier;
@@ -15545,6 +15675,7 @@ START_TEST(ddraw1)
/* Emperor: Rise of the Middle Kingdom locks a sysmem surface and then accesses
* the pointer after unlocking it. This test roughly replicates the calls that
* it makes. */
@@ -15527,6 +15658,7 @@ static void test_pinned_sysmem(void)
IDirectDrawSurface_Release(surface);
refcount = IDirectDraw_Release(ddraw);
ok(!refcount, "Device has %lu references left.\n", refcount);
+
DestroyWindow(window);
}
@@ -15646,6 +15778,7 @@ START_TEST(ddraw1)
test_vtbl_protection();
test_window_position();
test_get_display_mode();
@@ -536,5 +545,5 @@ index f5fc7b04053..b6374e75632 100644
test_filling_convention();
test_enum_devices();
--
2.40.1
2.43.0

View File

@@ -1,18 +1,18 @@
From 16d001f5562c37ac293fa547feef19887e635363 Mon Sep 17 00:00:00 2001
From e4688a88901a1c13b2df67a0444c34e3ee02bbab Mon Sep 17 00:00:00 2001
From: Andrew D'Addesio <andrew@fatbag.net>
Date: Fri, 8 Feb 2019 18:48:33 -1000
Subject: [PATCH] ddraw: Return correct devices based off requested DirectX
version.
---
dlls/ddraw/ddraw.c | 231 +++++++++++++++++++++++++--------------------
1 file changed, 130 insertions(+), 101 deletions(-)
dlls/ddraw/ddraw.c | 232 +++++++++++++++++++++++++--------------------
1 file changed, 129 insertions(+), 103 deletions(-)
diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c
index 83eeb33589e..324a149a425 100644
index 5887854556b..5ac95dc3043 100644
--- a/dlls/ddraw/ddraw.c
+++ b/dlls/ddraw/ddraw.c
@@ -47,37 +47,80 @@ static const DDDEVICEIDENTIFIER2 deviceidentifier =
@@ -44,37 +44,80 @@ static const DDDEVICEIDENTIFIER2 deviceidentifier =
0
};
@@ -28,7 +28,7 @@ index 83eeb33589e..324a149a425 100644
+ char device_desc[100];
char device_name[100];
const GUID *device_guid;
DWORD remove_caps;
DWORD unsupported_caps;
-} device_list7[] =
+} device_list[] =
{
@@ -38,7 +38,7 @@ index 83eeb33589e..324a149a425 100644
- "WINE Direct3D7 Hardware Transform and Lighting acceleration using WineD3D",
- "Wine D3D7 T&L HAL",
- &IID_IDirect3DTnLHalDevice,
+ D3D_VERSION(1)|D3D_VERSION(2),
+ D3D_VERSION(1) | D3D_VERSION(2),
+ "WineD3D Ramp Software Emulation",
+ "Ramp Emulation",
+ &IID_IDirect3DRampDevice,
@@ -49,20 +49,20 @@ index 83eeb33589e..324a149a425 100644
+ /* RGB Emulation (D3D 1-7) */
{
- "WINE Direct3D7 Hardware acceleration using WineD3D",
+ D3D_VERSION(1)|D3D_VERSION(2)|D3D_VERSION(3)|D3D_VERSION(7),
+ D3D_VERSION(1) | D3D_VERSION(2) | D3D_VERSION(3) | D3D_VERSION(7),
+ "WineD3D RGB Software Emulation",
+ "RGB Emulation",
+ &IID_IDirect3DRGBDevice,
+ D3DDEVCAPS_HWTRANSFORMANDLIGHT,
+ D3DDEVCAPS_HWTRANSFORMANDLIGHT | D3DDEVCAPS_DRAWPRIMITIVES2EX | D3DDEVCAPS_HWRASTERIZATION,
+ },
+
+ /* Direct3D HAL (D3D 1-7) */
+ {
+ D3D_VERSION(1)|D3D_VERSION(2)|D3D_VERSION(3)|D3D_VERSION(7),
+ D3D_VERSION(1) | D3D_VERSION(2) | D3D_VERSION(3) | D3D_VERSION(7),
+ "WineD3D Hardware Acceleration",
"Direct3D HAL",
&IID_IDirect3DHALDevice,
0,
D3DDEVCAPS_HWTRANSFORMANDLIGHT,
},
- /* RGB device */
@@ -71,13 +71,13 @@ index 83eeb33589e..324a149a425 100644
- "WINE Direct3D7 RGB Software Emulation using WineD3D",
- "Wine D3D7 RGB",
- &IID_IDirect3DRGBDevice,
- D3DDEVCAPS_HWTRANSFORMANDLIGHT,
- D3DDEVCAPS_HWTRANSFORMANDLIGHT | D3DDEVCAPS_DRAWPRIMITIVES2EX | D3DDEVCAPS_HWRASTERIZATION,
+ D3D_VERSION(2),
+ "WineD3D MMX Software Emulation",
+ "MMX Emulation",
+ &IID_IDirect3DMMXDevice,
+ 0,
+ },
},
+
+ /* Direct3D T&L HAL (D3D7 only) */
+ {
@@ -86,7 +86,7 @@ index 83eeb33589e..324a149a425 100644
+ "Direct3D T&L HAL",
+ &IID_IDirect3DTnLHalDevice,
+ 0,
},
+ },
+
+ /* In the future, we may wish to add the "Reference Rasterizer" and
+ * "Null device", which are only available in DX6-8 and must be explicitly
@@ -106,7 +106,7 @@ index 83eeb33589e..324a149a425 100644
};
static void STDMETHODCALLTYPE ddraw_null_wined3d_object_destroyed(void *parent) {}
@@ -1389,15 +1432,6 @@ HRESULT ddraw_get_d3dcaps(const struct ddraw *ddraw, D3DDEVICEDESC7 *caps)
@@ -1415,15 +1458,6 @@ HRESULT ddraw_get_d3dcaps(const struct ddraw *ddraw, D3DDEVICEDESC7 *caps)
D3DPTADDRESSCAPS_WRAP | D3DPTADDRESSCAPS_MIRROR | D3DPTADDRESSCAPS_CLAMP |
D3DPTADDRESSCAPS_BORDER | D3DPTADDRESSCAPS_INDEPENDENTUV);
@@ -122,7 +122,7 @@ index 83eeb33589e..324a149a425 100644
/* Fill the missing members, and do some fixup */
caps->dpcLineCaps.dwSize = sizeof(caps->dpcLineCaps);
caps->dpcLineCaps.dwTextureBlendCaps = D3DPTBLENDCAPS_ADD
@@ -3713,8 +3747,7 @@ static HRESULT WINAPI ddraw1_DuplicateSurface(IDirectDraw *iface, IDirectDrawSur
@@ -3746,8 +3780,7 @@ static HRESULT WINAPI ddraw1_DuplicateSurface(IDirectDraw *iface, IDirectDrawSur
/*****************************************************************************
* IDirect3D7::EnumDevices
*
@@ -132,8 +132,8 @@ index 83eeb33589e..324a149a425 100644
*
* Params:
* callback: Function to call for each enumerated device
@@ -3747,14 +3780,17 @@ static HRESULT WINAPI d3d7_EnumDevices(IDirect3D7 *iface, LPD3DENUMDEVICESCALLBA
@@ -3779,13 +3812,16 @@ static HRESULT WINAPI d3d7_EnumDevices(IDirect3D7 *iface, LPD3DENUMDEVICESCALLBA
}
dev_caps = device_desc7.dwDevCaps;
- for (i = 0; i < ARRAY_SIZE(device_list7); i++)
@@ -142,19 +142,18 @@ index 83eeb33589e..324a149a425 100644
HRESULT ret;
- device_desc7.deviceGUID = *device_list7[i].device_guid;
- device_desc7.dwDevCaps = dev_caps & ~device_list7[i].remove_caps;
- device_desc7.dwDevCaps = dev_caps & ~device_list7[i].unsupported_caps;
- ret = callback(device_list7[i].interface_name, device_list7[i].device_name, &device_desc7, context);
+ if (!(device_list[i].version_mask & D3D_VERSION(ddraw->d3dversion)))
+ continue;
+
+ device_desc7.deviceGUID = *device_list[i].device_guid;
+ device_desc7.dwDevCaps = dev_caps & ~device_list[i].remove_caps;
- ret = callback(device_list7[i].interface_name, device_list7[i].device_name, &device_desc7, context);
+ device_desc7.dwDevCaps = dev_caps & ~device_list[i].unsupported_caps;
+ ret = callback(device_list[i].device_name, device_list[i].device_name, &device_desc7, context);
if (ret != DDENUMRET_OK)
{
TRACE("Application cancelled the enumeration.\n");
@@ -3770,11 +3806,21 @@ static HRESULT WINAPI d3d7_EnumDevices(IDirect3D7 *iface, LPD3DENUMDEVICESCALLBA
@@ -3801,11 +3837,21 @@ static HRESULT WINAPI d3d7_EnumDevices(IDirect3D7 *iface, LPD3DENUMDEVICESCALLBA
return D3D_OK;
}
@@ -178,7 +177,7 @@ index 83eeb33589e..324a149a425 100644
*
* Versions 1, 2 and 3
*
@@ -3789,18 +3835,18 @@ static HRESULT WINAPI d3d7_EnumDevices(IDirect3D7 *iface, LPD3DENUMDEVICESCALLBA
@@ -3820,18 +3866,18 @@ static HRESULT WINAPI d3d7_EnumDevices(IDirect3D7 *iface, LPD3DENUMDEVICESCALLBA
*****************************************************************************/
static HRESULT WINAPI d3d3_EnumDevices(IDirect3D3 *iface, LPD3DENUMDEVICESCALLBACK callback, void *context)
{
@@ -206,7 +205,7 @@ index 83eeb33589e..324a149a425 100644
TRACE("iface %p, callback %p, context %p.\n", iface, callback, context);
@@ -3809,52 +3855,58 @@ static HRESULT WINAPI d3d3_EnumDevices(IDirect3D3 *iface, LPD3DENUMDEVICESCALLBA
@@ -3840,55 +3886,60 @@ static HRESULT WINAPI d3d3_EnumDevices(IDirect3D3 *iface, LPD3DENUMDEVICESCALLBA
wined3d_mutex_lock();
@@ -246,9 +245,15 @@ index 83eeb33589e..324a149a425 100644
- * flag set. This way it refuses the emulation device, and HAL devices
- * never have POW2 unset in d3d7 on windows. */
- if (ddraw->d3dversion != 1)
- {
+ clear_device_desc(&empty_desc1);
+ empty_desc1.dwSize = desc_size;
+
+ for (i = 0; i < ARRAY_SIZE(device_list); i++)
{
- static CHAR reference_description[] = "RGB Direct3D emulation";
-
+ if (!(device_list[i].version_mask & D3D_VERSION(ddraw->d3dversion)))
+ continue;
- TRACE("Enumerating WineD3D D3DDevice interface.\n");
- hal_desc = device_desc1;
- hel_desc = device_desc1;
@@ -261,22 +266,16 @@ index 83eeb33589e..324a149a425 100644
- hal_desc.dcmColorModel = 0;
- /* RGB, RAMP and MMX devices cannot report HAL hardware flags */
- hal_desc.dwFlags = 0;
-
- hr = callback((GUID *)&IID_IDirect3DRGBDevice, reference_description,
- device_name, &hal_desc, &hel_desc, context);
- if (hr != D3DENUMRET_OK)
+ clear_device_desc(&empty_desc1);
+ empty_desc1.dwSize = desc_size;
+
+ for (i = 0; i < ARRAY_SIZE(device_list); i++)
+ {
+ if (!(device_list[i].version_mask & D3D_VERSION(ddraw->d3dversion)))
+ continue;
+
- /* RGB, REF, RAMP and MMX devices don't report hardware transform and lighting capability */
- hal_desc.dwDevCaps &= ~(D3DDEVCAPS_HWTRANSFORMANDLIGHT | D3DDEVCAPS_DRAWPRIMITIVES2EX | D3DDEVCAPS_HWRASTERIZATION);
- hel_desc.dwDevCaps &= ~(D3DDEVCAPS_HWTRANSFORMANDLIGHT | D3DDEVCAPS_DRAWPRIMITIVES2EX | D3DDEVCAPS_HWRASTERIZATION);
+ if (IsEqualGUID(&IID_IDirect3DHALDevice, device_list[i].device_guid))
+ {
+ hal_desc = device_desc1;
+
- hr = callback((GUID *)&IID_IDirect3DRGBDevice, reference_description,
- device_name, &hal_desc, &hel_desc, context);
- if (hr != D3DENUMRET_OK)
+ /* The HAL device's hel_desc is almost empty -- but not completely */
+ hel_desc = empty_desc1;
+ hel_desc.dwFlags = D3DDD_COLORMODEL | D3DDD_DEVCAPS | D3DDD_TRANSFORMCAPS
@@ -296,6 +295,8 @@ index 83eeb33589e..324a149a425 100644
+ /* Ramp device supports grayscale only */
+ if (IsEqualGUID(&IID_IDirect3DRampDevice, device_list[i].device_guid))
+ hel_desc.dcmColorModel = D3DCOLOR_MONO;
+ /* RGB, REF, RAMP and MMX devices don't report hardware transform and lighting capability */
+ hel_desc.dwDevCaps &= ~(D3DDEVCAPS_HWTRANSFORMANDLIGHT | D3DDEVCAPS_DRAWPRIMITIVES2EX | D3DDEVCAPS_HWRASTERIZATION);
+ }
+
+ hr = callback((GUID *)device_list[i].device_guid, device_list[i].device_desc,
@@ -304,7 +305,7 @@ index 83eeb33589e..324a149a425 100644
{
TRACE("Application cancelled the enumeration.\n");
wined3d_mutex_unlock();
@@ -3862,29 +3914,6 @@ static HRESULT WINAPI d3d3_EnumDevices(IDirect3D3 *iface, LPD3DENUMDEVICESCALLBA
@@ -3896,31 +3947,6 @@ static HRESULT WINAPI d3d3_EnumDevices(IDirect3D3 *iface, LPD3DENUMDEVICESCALLBA
}
}
@@ -321,6 +322,8 @@ index 83eeb33589e..324a149a425 100644
- | D3DPTEXTURECAPS_NONPOW2CONDITIONAL | D3DPTEXTURECAPS_PERSPECTIVE);
- /* HAL devices have a HEL dcmColorModel of 0 */
- hel_desc.dcmColorModel = 0;
- /* HAL devices report hardware transform and lighting capability, but not in hel */
- hel_desc.dwDevCaps &= ~(D3DDEVCAPS_HWTRANSFORMANDLIGHT | D3DDEVCAPS_DRAWPRIMITIVES2EX);
-
- hr = callback((GUID *)&IID_IDirect3DHALDevice, wined3d_description,
- device_name, &hal_desc, &hel_desc, context);
@@ -335,5 +338,5 @@ index 83eeb33589e..324a149a425 100644
wined3d_mutex_unlock();
--
2.20.1
2.43.0

View File

@@ -8,4 +8,3 @@
# The Sims Online
Fixes: [19153] Resident Evil 1 fails to start (needs IDirect3D3::EnumDevices() to return a device named "RGB Emulation")
Depends: ddraw-Device_Caps
Disabled: True

View File

@@ -1,4 +1,4 @@
From 2533bbf747689e8326bb7795e890e7716144cb11 Mon Sep 17 00:00:00 2001
From b451aabaccbfb289853b8ddae8cb95e77af33f17 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Thu, 3 Sep 2015 01:25:14 +0200
Subject: [PATCH] fonts: Add Liberation Serif as an Times New Roman
@@ -13,14 +13,15 @@ Subject: [PATCH] fonts: Add Liberation Serif as an Times New Roman
create mode 100644 fonts/times.ttf
diff --git a/fonts/Makefile.in b/fonts/Makefile.in
index fb2cd83c4e6..9251153705d 100644
index ab80e7b70f7..94763601824 100644
--- a/fonts/Makefile.in
+++ b/fonts/Makefile.in
@@ -12,4 +12,5 @@ FONT_SRCS = \
@@ -11,5 +11,6 @@ SOURCES = \
system.sfd \
tahoma.sfd \
tahomabd.sfd \
webdings.sfd \
+ times.sfd \
webdings.sfd \
wingding.sfd
diff --git a/fonts/times.sfd b/fonts/times.sfd
new file mode 100644
@@ -99112,5 +99113,5 @@ literal 0
HcmV?d00001
--
2.27.0
2.43.0

View File

@@ -1,4 +1,4 @@
From 7dff09756ebc13c38695050b9de271a84c2ea7b6 Mon Sep 17 00:00:00 2001
From 10df8c207e3e880bd578392e266a191e6b8ef9dd Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Tue, 9 Jul 2019 14:13:28 +1000
Subject: [PATCH] user32: Do not enumerate the registry in
@@ -25,11 +25,11 @@ index 8f3cd8acae7..072f1fab23a 100644
{
SendMessageTimeoutW(handle, WM_DEVICECHANGE, flags, (LPARAM)header, SMTO_ABORTIFHUNG, 2000, NULL);
diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c
index 197a82db251..6385ef002b9 100644
index d48440a20be..3a5df122ff4 100644
--- a/dlls/user32/tests/input.c
+++ b/dlls/user32/tests/input.c
@@ -5369,6 +5369,40 @@ static void test_ClipCursor( char **argv )
if (!EqualRect( &rect, &virtual_rect )) ok_ret( 1, ClipCursor( NULL ) );
@@ -5215,6 +5215,40 @@ static void test_keyboard_ll_hook_blocking(void)
ok_ret( 1, DestroyWindow( hwnd ) );
}
+static void test_GetKeyboardLayoutList(void)
@@ -66,10 +66,10 @@ index 197a82db251..6385ef002b9 100644
+ }
+}
+
START_TEST(input)
{
char **argv;
@@ -5413,6 +5447,7 @@ START_TEST(input)
/* run the tests in a separate desktop to avoid interaction with other
* tests, current desktop state, or user actions. */
static void test_input_desktop( char **argv )
@@ -5279,6 +5313,7 @@ START_TEST(input)
test_GetRawInputBuffer();
test_RegisterRawInputDevices();
test_rawinput(argv[0]);
@@ -78,10 +78,10 @@ index 197a82db251..6385ef002b9 100644
if(pGetMouseMovePointsEx)
diff --git a/dlls/win32u/input.c b/dlls/win32u/input.c
index 22f371969b9..e0a0bd332ed 100644
index aaaac12ce36..85820a74aba 100644
--- a/dlls/win32u/input.c
+++ b/dlls/win32u/input.c
@@ -1257,11 +1257,7 @@ HKL WINAPI NtUserActivateKeyboardLayout( HKL layout, UINT flags )
@@ -1280,11 +1280,7 @@ HKL WINAPI NtUserActivateKeyboardLayout( HKL layout, UINT flags )
*/
UINT WINAPI NtUserGetKeyboardLayoutList( INT size, HKL *layouts )
{
@@ -94,7 +94,7 @@ index 22f371969b9..e0a0bd332ed 100644
HKL layout;
TRACE_(keyboard)( "size %d, layouts %p.\n", size, layouts );
@@ -1275,33 +1271,6 @@ UINT WINAPI NtUserGetKeyboardLayoutList( INT size, HKL *layouts )
@@ -1298,33 +1294,6 @@ UINT WINAPI NtUserGetKeyboardLayoutList( INT size, HKL *layouts )
if (size && layouts)
{
layouts[count - 1] = layout;
@@ -129,5 +129,5 @@ index 22f371969b9..e0a0bd332ed 100644
return count;
--
2.40.1
2.43.0

View File

@@ -0,0 +1,25 @@
From cbfeb2a5abed1c5c532280290f70f5299894cc8f Mon Sep 17 00:00:00 2001
From: Czcibor Bohusz-Dobosz <czbd@o2.pl>
Date: Sun, 14 Jan 2024 17:50:49 +1100
Subject: [PATCH] msi: Only process cabinet files if it exists
---
dlls/msi/files.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/msi/files.c b/dlls/msi/files.c
index 96c6c5eaa4b..c85c66ae53e 100644
--- a/dlls/msi/files.c
+++ b/dlls/msi/files.c
@@ -819,7 +819,7 @@ UINT ACTION_PatchFiles( MSIPACKAGE *package )
data.cb = patchfiles_cb;
data.user = &cursor;
- if (!msi_cabextract( package, mi, &data ))
+ if (mi->cabinet && !msi_cabextract( package, mi, &data ))
{
ERR("Failed to extract cabinet: %s\n", debugstr_w(mi->cabinet));
rc = ERROR_INSTALL_FAILURE;
--
2.43.0

View File

@@ -0,0 +1 @@
Fixes: [50148] msi: Process cabinet files only when one is supplied.

View File

@@ -0,0 +1,129 @@
From 9409a546aa17e178a6f1ce07cdaa8e0186429239 Mon Sep 17 00:00:00 2001
From: Jefferson Carpenter <jeffersoncarpenter2@gmail.com>
Date: Thu, 4 Nov 2021 22:30:05 +0000
Subject: [PATCH] msxml3: Write to DOMDocument mxwriter destination in
endDocument.
---
dlls/msxml3/mxwriter.c | 41 +++++++++++++++++++++++++++++++++--
dlls/msxml3/tests/saxreader.c | 1 +
2 files changed, 40 insertions(+), 2 deletions(-)
diff --git a/dlls/msxml3/mxwriter.c b/dlls/msxml3/mxwriter.c
index 4a2844bcf08..8caf8979692 100644
--- a/dlls/msxml3/mxwriter.c
+++ b/dlls/msxml3/mxwriter.c
@@ -189,6 +189,7 @@ typedef struct
BSTR element;
IStream *dest;
+ IXMLDOMDocument *dest_doc;
output_buffer buffer;
} mxwriter;
@@ -850,6 +851,7 @@ static ULONG WINAPI mxwriter_Release(IMXWriter *iface)
free_output_buffer(&This->buffer);
if (This->dest) IStream_Release(This->dest);
+ if (This->dest_doc) IXMLDOMDocument_Release(This->dest_doc);
SysFreeString(This->version);
SysFreeString(This->encoding);
@@ -914,6 +916,8 @@ static HRESULT WINAPI mxwriter_put_output(IMXWriter *iface, VARIANT dest)
{
if (This->dest) IStream_Release(This->dest);
This->dest = NULL;
+ if (This->dest_doc) IXMLDOMDocument_Release(This->dest_doc);
+ This->dest_doc = NULL;
close_output_buffer(This);
break;
}
@@ -929,12 +933,33 @@ static HRESULT WINAPI mxwriter_put_output(IMXWriter *iface, VARIANT dest)
if (This->dest) IStream_Release(This->dest);
This->dest = stream;
+ if (This->dest_doc) IXMLDOMDocument_Release(This->dest_doc);
+ This->dest_doc = NULL;
break;
}
FIXME("unhandled interface type for VT_UNKNOWN destination\n");
return E_NOTIMPL;
}
+ case VT_DISPATCH:
+ {
+ IXMLDOMDocument *doc;
+
+ hr = IDispatch_QueryInterface(V_DISPATCH(&dest), &IID_IXMLDOMDocument, (void**)&doc);
+ if (hr == S_OK)
+ {
+ close_output_buffer(This);
+
+ if (This->dest) IStream_Release(This->dest);
+ This->dest = NULL;
+ if (This->dest_doc) IXMLDOMDocument_Release(This->dest_doc);
+ This->dest_doc = doc;
+ break;
+ }
+
+ FIXME("unhandled interface type for VT_DISPATCH destination\n");
+ return E_NOTIMPL;
+ }
default:
FIXME("unhandled destination type %s\n", debugstr_variant(&dest));
return E_NOTIMPL;
@@ -1201,7 +1226,7 @@ static HRESULT WINAPI SAXContentHandler_putDocumentLocator(
{
mxwriter *This = impl_from_ISAXContentHandler( iface );
FIXME("(%p)->(%p)\n", This, locator);
- return E_NOTIMPL;
+ return S_OK;
}
static HRESULT WINAPI SAXContentHandler_startDocument(ISAXContentHandler *iface)
@@ -1239,10 +1264,21 @@ static HRESULT WINAPI SAXContentHandler_startDocument(ISAXContentHandler *iface)
static HRESULT WINAPI SAXContentHandler_endDocument(ISAXContentHandler *iface)
{
+ HRESULT hr;
+ VARIANT dest;
+ VARIANT_BOOL success;
mxwriter *This = impl_from_ISAXContentHandler( iface );
TRACE("(%p)\n", This);
This->prop_changed = FALSE;
- return flush_output_buffer(This);
+
+ hr = flush_output_buffer(This);
+ if (FAILED(hr)) return hr;
+
+ if (This->dest_doc) {
+ mxwriter_get_output(&This->IMXWriter_iface, &dest);
+ return IXMLDOMDocument_loadXML(This->dest_doc, V_BSTR(&dest), &success);
+ }
+ return S_OK;
}
static HRESULT WINAPI SAXContentHandler_startPrefixMapping(
@@ -2630,6 +2666,7 @@ HRESULT MXWriter_create(MSXML_VERSION version, void **ppObj)
This->newline = FALSE;
This->dest = NULL;
+ This->dest_doc = NULL;
hr = init_output_buffer(This->xml_enc, &This->buffer);
if (hr != S_OK) {
diff --git a/dlls/msxml3/tests/saxreader.c b/dlls/msxml3/tests/saxreader.c
index e123d4eba5a..f933ffe85a2 100644
--- a/dlls/msxml3/tests/saxreader.c
+++ b/dlls/msxml3/tests/saxreader.c
@@ -4563,6 +4563,7 @@ static void test_mxwriter_domdoc(void)
todo_wine
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ if (!node) return;
hr = IXMLDOMNode_get_nodeName(node, &str);
todo_wine {
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
--
2.43.0

View File

@@ -0,0 +1,3 @@
Fixes: [51965] msxml3: IMXWrite::output to support DOMDocument.
#TODO: Update tests.

View File

@@ -1,4 +1,4 @@
From e8fe190b8e6352987961e1da946d125b99309034 Mon Sep 17 00:00:00 2001
From 7b59a735bf21a4db50669c360666191493767909 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Mon, 3 Apr 2017 05:30:27 +0200
Subject: [PATCH] ntdll: Implement HashLinks field in LDR module data.
@@ -9,7 +9,7 @@ Subject: [PATCH] ntdll: Implement HashLinks field in LDR module data.
2 files changed, 117 insertions(+)
diff --git a/dlls/kernel32/tests/loader.c b/dlls/kernel32/tests/loader.c
index ec6f2d5c6a7..654a83c92f9 100644
index 8f418ef09a9..30f089bd64f 100644
--- a/dlls/kernel32/tests/loader.c
+++ b/dlls/kernel32/tests/loader.c
@@ -28,6 +28,7 @@
@@ -20,7 +20,7 @@ index ec6f2d5c6a7..654a83c92f9 100644
#include "wine/test.h"
#include "delayloadhandler.h"
@@ -4207,6 +4208,79 @@ static void test_Wow64Transition(void)
@@ -4205,6 +4206,79 @@ static void test_Wow64Transition(void)
debugstr_wn(name->SectionFileName.Buffer, name->SectionFileName.Length / sizeof(WCHAR)));
}
@@ -100,7 +100,7 @@ index ec6f2d5c6a7..654a83c92f9 100644
START_TEST(loader)
{
int argc;
@@ -4288,6 +4362,7 @@ START_TEST(loader)
@@ -4286,6 +4360,7 @@ START_TEST(loader)
test_InMemoryOrderModuleList();
test_LoadPackagedLibrary();
test_wow64_redirection();
@@ -109,7 +109,7 @@ index ec6f2d5c6a7..654a83c92f9 100644
test_dll_file( "kernel32.dll" );
test_dll_file( "advapi32.dll" );
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index 851fdcf3535..ed169d7bced 100644
index 714d3f17ff0..415fcbb1aa6 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -133,6 +133,9 @@ struct file_id
@@ -156,7 +156,7 @@ index 851fdcf3535..ed169d7bced 100644
/*************************************************************************
* get_modref
*
@@ -1522,7 +1552,12 @@ static WINE_MODREF *alloc_module( HMODULE hModule, const UNICODE_STRING *nt_name
@@ -1528,7 +1558,12 @@ static WINE_MODREF *alloc_module( HMODULE hModule, const UNICODE_STRING *nt_name
&wm->ldr.InLoadOrderLinks);
InsertTailList(&NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList,
&wm->ldr.InMemoryOrderLinks);
@@ -169,7 +169,7 @@ index 851fdcf3535..ed169d7bced 100644
if (!(nt->OptionalHeader.DllCharacteristics & IMAGE_DLLCHARACTERISTICS_NX_COMPAT))
{
@@ -2214,6 +2249,7 @@ static NTSTATUS build_module( LPCWSTR load_path, const UNICODE_STRING *nt_name,
@@ -2226,6 +2261,7 @@ static NTSTATUS build_module( LPCWSTR load_path, const UNICODE_STRING *nt_name,
/* the module has only be inserted in the load & memory order lists */
RemoveEntryList(&wm->ldr.InLoadOrderLinks);
RemoveEntryList(&wm->ldr.InMemoryOrderLinks);
@@ -177,7 +177,7 @@ index 851fdcf3535..ed169d7bced 100644
/* FIXME: there are several more dangling references
* left. Including dlls loaded by this dll before the
@@ -3896,6 +3932,7 @@ static void free_modref( WINE_MODREF *wm )
@@ -3908,6 +3944,7 @@ static void free_modref( WINE_MODREF *wm )
RemoveEntryList(&wm->ldr.InLoadOrderLinks);
RemoveEntryList(&wm->ldr.InMemoryOrderLinks);
@@ -185,15 +185,15 @@ index 851fdcf3535..ed169d7bced 100644
if (wm->ldr.InInitializationOrderLinks.Flink)
RemoveEntryList(&wm->ldr.InInitializationOrderLinks);
@@ -4276,6 +4313,7 @@ void loader_init( CONTEXT *context, void **entry )
@@ -4263,6 +4300,7 @@ void loader_init( CONTEXT *context, void **entry )
ANSI_STRING ctrl_routine = RTL_CONSTANT_STRING( "CtrlRoutine" );
WINE_MODREF *kernel32;
PEB *peb = NtCurrentTeb()->Peb;
+ unsigned int i;
NtQueryVirtualMemory( GetCurrentProcess(), LdrInitializeThunk, MemoryBasicInformation,
&meminfo, sizeof(meminfo), NULL );
@@ -4294,6 +4332,10 @@ void loader_init( CONTEXT *context, void **entry )
peb->LdrData = &ldr;
peb->FastPebLock = &peb_lock;
@@ -4278,6 +4316,10 @@ void loader_init( CONTEXT *context, void **entry )
RtlSetBits( peb->TlsBitmap, 0, NtCurrentTeb()->WowTebOffset ? WOW64_TLS_MAX_NUMBER : 1 );
RtlSetBits( peb->TlsBitmap, NTDLL_TLS_ERRNO, 1 );

View File

@@ -1,62 +0,0 @@
From 89935f2a91305a577da2b08f80ac74235235a0d2 Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Sun, 27 Mar 2016 12:30:00 +0800
Subject: [PATCH] oleaut32: Do not reimplement OleLoadPicture in
OleLoadPicturePath.
punkCaller is ignored by StdPicture ClassFactory implementation anyway.
---
dlls/oleaut32/olepicture.c | 26 +-------------------------
1 file changed, 1 insertion(+), 25 deletions(-)
diff --git a/dlls/oleaut32/olepicture.c b/dlls/oleaut32/olepicture.c
index 7312adac1dc..373ccd61724 100644
--- a/dlls/oleaut32/olepicture.c
+++ b/dlls/oleaut32/olepicture.c
@@ -2447,9 +2447,7 @@ HRESULT WINAPI OleLoadPicturePath( LPOLESTR szURLorPath, LPUNKNOWN punkCaller,
DWORD dwBytesRead;
IStream *stream;
BOOL bRead;
- IPersistStream *pStream;
HRESULT hRes;
- HRESULT init_res;
WCHAR *file_candidate;
WCHAR path_buf[MAX_PATH];
@@ -2526,32 +2524,10 @@ HRESULT WINAPI OleLoadPicturePath( LPOLESTR szURLorPath, LPUNKNOWN punkCaller,
return hRes;
}
- init_res = CoInitialize(NULL);
-
- hRes = CoCreateInstance(&CLSID_StdPicture, punkCaller, CLSCTX_INPROC_SERVER,
- &IID_IPicture, (LPVOID*)&ipicture);
- if (SUCCEEDED(hRes)) {
- hRes = IPicture_QueryInterface(ipicture, &IID_IPersistStream, (LPVOID*)&pStream);
-
- if (SUCCEEDED(hRes)) {
- hRes = IPersistStream_Load(pStream, stream);
-
- if (SUCCEEDED(hRes)) {
- hRes = IPicture_QueryInterface(ipicture, riid, ppvRet);
-
- if (FAILED(hRes))
- ERR("Failed to get interface %s from IPicture.\n", debugstr_guid(riid));
- }
- IPersistStream_Release(pStream);
- }
- IPicture_Release(ipicture);
- }
+ hRes = OleLoadPicture(stream, 0, FALSE, riid, ppvRet);
IStream_Release(stream);
- if (SUCCEEDED(init_res))
- CoUninitialize();
-
return hRes;
}
--
2.29.2

View File

@@ -1,115 +0,0 @@
From b6a510e5397091c59d9fb3a29bf75bc709727cb1 Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Sun, 27 Mar 2016 16:26:47 +0800
Subject: [PATCH] oleaut32: Factor out stream creation from OleLoadPicturePath.
---
dlls/oleaut32/olepicture.c | 76 ++++++++++++++++++++------------------
1 file changed, 41 insertions(+), 35 deletions(-)
diff --git a/dlls/oleaut32/olepicture.c b/dlls/oleaut32/olepicture.c
index 3758b785341..ef564e98164 100644
--- a/dlls/oleaut32/olepicture.c
+++ b/dlls/oleaut32/olepicture.c
@@ -2336,6 +2336,45 @@ HRESULT WINAPI OleLoadPictureFile(VARIANT file, LPDISPATCH *picture)
return E_NOTIMPL;
}
+static HRESULT create_stream(const WCHAR *filename, IStream **stream)
+{
+ HANDLE hFile;
+ DWORD dwFileSize;
+ HGLOBAL hGlobal = NULL;
+ DWORD dwBytesRead;
+ HRESULT hr = S_OK;
+
+ hFile = CreateFileW(filename, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL);
+ if (hFile == INVALID_HANDLE_VALUE)
+ return HRESULT_FROM_WIN32(GetLastError());
+
+ dwFileSize = GetFileSize(hFile, NULL);
+ if (dwFileSize != INVALID_FILE_SIZE)
+ {
+ hGlobal = GlobalAlloc(GMEM_FIXED, dwFileSize);
+ if (!hGlobal)
+ hr = E_OUTOFMEMORY;
+ else
+ {
+ if (!ReadFile(hFile, hGlobal, dwFileSize, &dwBytesRead, NULL))
+ {
+ GlobalFree(hGlobal);
+ hr = HRESULT_FROM_WIN32(GetLastError());
+ }
+ }
+ }
+
+ CloseHandle(hFile);
+
+ if (FAILED(hr)) return hr;
+
+ hr = CreateStreamOnHGlobal(hGlobal, TRUE, stream);
+ if (FAILED(hr))
+ GlobalFree(hGlobal);
+
+ return hr;
+}
+
/***********************************************************************
* OleSavePictureFile (OLEAUT32.423)
*/
@@ -2352,13 +2391,7 @@ HRESULT WINAPI OleLoadPicturePath( LPOLESTR szURLorPath, LPUNKNOWN punkCaller,
DWORD dwReserved, OLE_COLOR clrReserved, REFIID riid,
LPVOID *ppvRet )
{
- IPicture *ipicture;
- HANDLE hFile;
- DWORD dwFileSize;
- HGLOBAL hGlobal = NULL;
- DWORD dwBytesRead;
IStream *stream;
- BOOL bRead;
HRESULT hRes;
WCHAR *file_candidate;
WCHAR path_buf[MAX_PATH];
@@ -2387,36 +2420,9 @@ HRESULT WINAPI OleLoadPicturePath( LPOLESTR szURLorPath, LPUNKNOWN punkCaller,
/* Handle candidate DOS paths separately. */
if (file_candidate[1] == ':') {
- hFile = CreateFileW(file_candidate, GENERIC_READ, 0, NULL, OPEN_EXISTING,
- 0, NULL);
- if (hFile == INVALID_HANDLE_VALUE)
- return INET_E_RESOURCE_NOT_FOUND;
-
- dwFileSize = GetFileSize(hFile, NULL);
- if (dwFileSize != INVALID_FILE_SIZE )
- {
- hGlobal = GlobalAlloc(GMEM_FIXED,dwFileSize);
- if ( hGlobal)
- {
- bRead = ReadFile(hFile, hGlobal, dwFileSize, &dwBytesRead, NULL) && dwBytesRead == dwFileSize;
- if (!bRead)
- {
- GlobalFree(hGlobal);
- hGlobal = 0;
- }
- }
- }
- CloseHandle(hFile);
-
- if (!hGlobal)
+ hRes = create_stream(file_candidate, &stream);
+ if (FAILED(hRes))
return INET_E_RESOURCE_NOT_FOUND;
-
- hRes = CreateStreamOnHGlobal(hGlobal, TRUE, &stream);
- if (FAILED(hRes))
- {
- GlobalFree(hGlobal);
- return hRes;
- }
} else {
IMoniker *pmnk;
IBindCtx *pbc;
--
2.30.2

View File

@@ -1,172 +0,0 @@
From eb7f29d66825c454043b3f68594e5b50412300ed Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Sun, 27 Mar 2016 16:28:33 +0800
Subject: [PATCH] oleaut32: Implement OleLoadPictureFile. (v2)
---
dlls/oleaut32/olepicture.c | 36 ++++++++++++++++------
dlls/oleaut32/tests/olepicture.c | 53 ++++++++++++++++++++++++++++++++
2 files changed, 80 insertions(+), 9 deletions(-)
diff --git a/dlls/oleaut32/olepicture.c b/dlls/oleaut32/olepicture.c
index 4a478217997..b5c9e8db271 100644
--- a/dlls/oleaut32/olepicture.c
+++ b/dlls/oleaut32/olepicture.c
@@ -2387,15 +2387,6 @@ HRESULT WINAPI OleLoadPictureEx( LPSTREAM lpstream, LONG lSize, BOOL fRunmode,
return hr;
}
-/***********************************************************************
- * OleLoadPictureFile (OLEAUT32.422)
- */
-HRESULT WINAPI OleLoadPictureFile(VARIANT file, LPDISPATCH *picture)
-{
- FIXME("(%s %p): stub\n", wine_dbgstr_variant(&file), picture);
- return E_NOTIMPL;
-}
-
static HRESULT create_stream(const WCHAR *filename, IStream **stream)
{
HANDLE hFile;
@@ -2435,6 +2426,33 @@ static HRESULT create_stream(const WCHAR *filename, IStream **stream)
return hr;
}
+/***********************************************************************
+ * OleLoadPictureFile (OLEAUT32.422)
+ */
+HRESULT WINAPI OleLoadPictureFile(VARIANT filename, IDispatch **picture)
+{
+ IStream *stream;
+ HRESULT hr;
+
+ TRACE("(%s,%p)\n", wine_dbgstr_variant(&filename), picture);
+
+ if (V_VT(&filename) != VT_BSTR)
+ return CTL_E_FILENOTFOUND;
+
+ hr = create_stream(V_BSTR(&filename), &stream);
+ if (hr != S_OK)
+ {
+ if (hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND))
+ return CTL_E_FILENOTFOUND;
+
+ return CTL_E_PATHFILEACCESSERROR;
+ }
+
+ hr = OleLoadPicture(stream, 0, FALSE, &IID_IDispatch, (void **)picture);
+ IStream_Release(stream);
+ return hr;
+}
+
/***********************************************************************
* OleSavePictureFile (OLEAUT32.423)
*/
diff --git a/dlls/oleaut32/tests/olepicture.c b/dlls/oleaut32/tests/olepicture.c
index 747134e2458..78c2ed5294e 100644
--- a/dlls/oleaut32/tests/olepicture.c
+++ b/dlls/oleaut32/tests/olepicture.c
@@ -958,6 +958,7 @@ static void test_OleLoadPicturePath(void)
HANDLE file;
DWORD size;
WCHAR *ptr;
+ VARIANT var;
const struct
{
@@ -1024,6 +1025,14 @@ static void test_OleLoadPicturePath(void)
if (pic)
IPicture_Release(pic);
+ VariantInit(&var);
+ V_VT(&var) = VT_BSTR;
+ V_BSTR(&var) = SysAllocString(temp_fileW + 8);
+ hres = OleLoadPictureFile(var, (IDispatch **)&pic);
+ ok(hres == S_OK, "OleLoadPictureFile error %#x\n", hres);
+ IPicture_Release(pic);
+ VariantClear(&var);
+
/* Try a DOS path with tacked on "file:". */
hres = OleLoadPicturePath(temp_fileW, NULL, 0, 0, &IID_IPicture, (void **)&pic);
ok(hres == S_OK ||
@@ -1032,6 +1041,13 @@ static void test_OleLoadPicturePath(void)
if (pic)
IPicture_Release(pic);
+ VariantInit(&var);
+ V_VT(&var) = VT_BSTR;
+ V_BSTR(&var) = SysAllocString(temp_fileW);
+ hres = OleLoadPictureFile(var, (IDispatch **)&pic);
+ ok(hres == CTL_E_PATHFILEACCESSERROR, "wrong error %#x\n", hres);
+ VariantClear(&var);
+
DeleteFileA(temp_file);
/* Try with a nonexistent file. */
@@ -1041,12 +1057,26 @@ static void test_OleLoadPicturePath(void)
broken(hres == E_FAIL), /*Win2k */
"Expected OleLoadPicturePath to return INET_E_RESOURCE_NOT_FOUND, got 0x%08lx\n", hres);
+ VariantInit(&var);
+ V_VT(&var) = VT_BSTR;
+ V_BSTR(&var) = SysAllocString(temp_fileW + 8);
+ hres = OleLoadPictureFile(var, (IDispatch **)&pic);
+ ok(hres == CTL_E_FILENOTFOUND, "wrong error %#x\n", hres);
+ VariantClear(&var);
+
hres = OleLoadPicturePath(temp_fileW, NULL, 0, 0, &IID_IPicture, (void **)&pic);
ok(hres == INET_E_RESOURCE_NOT_FOUND || /* XP+ */
broken(hres == E_UNEXPECTED) || /* NT4 */
broken(hres == E_FAIL), /* Win2k */
"Expected OleLoadPicturePath to return INET_E_RESOURCE_NOT_FOUND, got 0x%08lx\n", hres);
+ VariantInit(&var);
+ V_VT(&var) = VT_BSTR;
+ V_BSTR(&var) = SysAllocString(temp_fileW);
+ hres = OleLoadPictureFile(var, (IDispatch **)&pic);
+ ok(hres == CTL_E_PATHFILEACCESSERROR, "wrong error %#x\n", hres);
+ VariantClear(&var);
+
file = CreateFileA(temp_file, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS,
FILE_ATTRIBUTE_NORMAL, NULL);
WriteFile(file, bmpimage, sizeof(bmpimage), &size, NULL);
@@ -1068,6 +1098,13 @@ static void test_OleLoadPicturePath(void)
if (pic)
IPicture_Release(pic);
+ VariantInit(&var);
+ V_VT(&var) = VT_BSTR;
+ V_BSTR(&var) = SysAllocString(temp_fileW);
+ hres = OleLoadPictureFile(var, (IDispatch **)&pic);
+ ok(hres == CTL_E_PATHFILEACCESSERROR, "wrong error %#x\n", hres);
+ VariantClear(&var);
+
DeleteFileA(temp_file);
/* Try with a nonexistent file. */
@@ -1076,6 +1113,22 @@ static void test_OleLoadPicturePath(void)
broken(hres == E_UNEXPECTED) || /* NT4 */
broken(hres == E_FAIL), /* Win2k */
"Expected OleLoadPicturePath to return INET_E_RESOURCE_NOT_FOUND, got 0x%08lx\n", hres);
+
+ VariantInit(&var);
+ V_VT(&var) = VT_BSTR;
+ V_BSTR(&var) = SysAllocString(temp_fileW);
+ hres = OleLoadPictureFile(var, (IDispatch **)&pic);
+ ok(hres == CTL_E_PATHFILEACCESSERROR, "wrong error %#lx\n", hres);
+ VariantClear(&var);
+
+ VariantInit(&var);
+ V_VT(&var) = VT_INT;
+ V_INT(&var) = 762;
+ hres = OleLoadPictureFile(var, (IDispatch **)&pic);
+ ok(hres == CTL_E_FILENOTFOUND, "wrong error %#lx\n", hres);
+
+if (0) /* crashes under Windows */
+ hres = OleLoadPictureFile(var, NULL);
}
static void test_himetric(void)
--
2.35.1

View File

@@ -1 +0,0 @@
Fixes: Implement oleaut32.OleLoadPictureFile

View File

@@ -0,0 +1,74 @@
From 291a45af5ab416fc896f1343453c7e3a24f188d8 Mon Sep 17 00:00:00 2001
From: Robert Wilhelm <robert.wilhelm@gmx.net>
Date: Wed, 29 Jun 2022 16:05:48 +0200
Subject: [PATCH] scrrun: Implement MoveFolder().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52128
Signed-off-by: Robert Wilhelm <robert.wilhelm@gmx.net>
---
dlls/scrrun/filesystem.c | 7 +++----
dlls/scrrun/tests/filesystem.c | 20 ++++++++++++++++++++
2 files changed, 23 insertions(+), 4 deletions(-)
diff --git a/dlls/scrrun/filesystem.c b/dlls/scrrun/filesystem.c
index e53355267db..ab02d4680cd 100644
--- a/dlls/scrrun/filesystem.c
+++ b/dlls/scrrun/filesystem.c
@@ -3803,12 +3803,11 @@ static HRESULT WINAPI filesys_MoveFile(IFileSystem3 *iface, BSTR source, BSTR de
return MoveFileW(source, destination) ? S_OK : create_error(GetLastError());
}
-static HRESULT WINAPI filesys_MoveFolder(IFileSystem3 *iface,BSTR Source,
- BSTR Destination)
+static HRESULT WINAPI filesys_MoveFolder(IFileSystem3 *iface, BSTR source, BSTR destination)
{
- FIXME("%p %s %s\n", iface, debugstr_w(Source), debugstr_w(Destination));
+ TRACE("%p %s %s\n", iface, debugstr_w(source), debugstr_w(destination));
- return E_NOTIMPL;
+ return MoveFileW(source, destination) ? S_OK : create_error(GetLastError());
}
static inline HRESULT copy_file(const WCHAR *source, DWORD source_len,
diff --git a/dlls/scrrun/tests/filesystem.c b/dlls/scrrun/tests/filesystem.c
index e53bd092ce9..7a5de4407a8 100644
--- a/dlls/scrrun/tests/filesystem.c
+++ b/dlls/scrrun/tests/filesystem.c
@@ -2639,6 +2639,25 @@ static void test_MoveFile(void)
SysFreeString(str);
}
+static void test_MoveFolder(void)
+{
+ BSTR src, dst;
+ WCHAR buffW1[MAX_PATH],buffW2[MAX_PATH];
+ HRESULT hr;
+
+ get_temp_path(L"foo", buffW1);
+ get_temp_path(L"bar", buffW2);
+
+ ok(CreateDirectoryW(buffW1, NULL), "CreateDirectory(%s) failed\n", wine_dbgstr_w(buffW1));
+ src = SysAllocString(buffW1);
+ dst = SysAllocString(buffW2);
+ hr = IFileSystem3_MoveFolder(fs3, src, dst);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ SysFreeString(src);
+ SysFreeString(dst);
+ ok(RemoveDirectoryW(buffW2), "can't remove %s directory\n", wine_dbgstr_w(buffW2));
+}
+
static void test_DoOpenPipeStream(void)
{
static const char testdata[] = "test";
@@ -2772,6 +2791,7 @@ START_TEST(filesystem)
test_GetExtensionName();
test_GetSpecialFolder();
test_MoveFile();
+ test_MoveFolder();
test_DoOpenPipeStream();
IFileSystem3_Release(fs3);
--
2.43.0

View File

@@ -0,0 +1,61 @@
From 0e42b8f30afc0984703f09258e1fbc6224c207fa Mon Sep 17 00:00:00 2001
From: Robert Wilhelm <robert.wilhelm@gmx.net>
Date: Wed, 29 Jun 2022 16:11:56 +0200
Subject: [PATCH] scrrun: Check for null and empty arguments in MoveFolder.
Signed-off-by: Robert Wilhelm <robert.wilhelm@gmx.net>
---
dlls/scrrun/filesystem.c | 3 +++
dlls/scrrun/tests/filesystem.c | 15 ++++++++++++++-
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/dlls/scrrun/filesystem.c b/dlls/scrrun/filesystem.c
index ab02d4680cd..a56af2f0461 100644
--- a/dlls/scrrun/filesystem.c
+++ b/dlls/scrrun/filesystem.c
@@ -3807,6 +3807,9 @@ static HRESULT WINAPI filesys_MoveFolder(IFileSystem3 *iface, BSTR source, BSTR
{
TRACE("%p %s %s\n", iface, debugstr_w(source), debugstr_w(destination));
+ if(!source || !source[0] || !destination || !destination[0])
+ return E_INVALIDARG;
+
return MoveFileW(source, destination) ? S_OK : create_error(GetLastError());
}
diff --git a/dlls/scrrun/tests/filesystem.c b/dlls/scrrun/tests/filesystem.c
index 7a5de4407a8..3ddd782a6fe 100644
--- a/dlls/scrrun/tests/filesystem.c
+++ b/dlls/scrrun/tests/filesystem.c
@@ -2641,7 +2641,7 @@ static void test_MoveFile(void)
static void test_MoveFolder(void)
{
- BSTR src, dst;
+ BSTR src, dst, str, empty;
WCHAR buffW1[MAX_PATH],buffW2[MAX_PATH];
HRESULT hr;
@@ -2656,6 +2656,19 @@ static void test_MoveFolder(void)
SysFreeString(src);
SysFreeString(dst);
ok(RemoveDirectoryW(buffW2), "can't remove %s directory\n", wine_dbgstr_w(buffW2));
+
+ str = SysAllocString(L"null.dir");
+ empty = SysAllocString(L"");
+ hr = IFileSystem3_MoveFolder(fs3, str, NULL);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
+ hr = IFileSystem3_MoveFolder(fs3, NULL, str);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
+ hr = IFileSystem3_MoveFolder(fs3, str, empty);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
+ hr = IFileSystem3_MoveFolder(fs3, empty, str);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
+ SysFreeString(str);
+ SysFreeString(empty);
}
static void test_DoOpenPipeStream(void)
--
2.43.0

View File

@@ -0,0 +1,35 @@
From 8aadb303edcc5b1fc951bbdef62269a1d42ad7aa Mon Sep 17 00:00:00 2001
From: Robert Wilhelm <robert.wilhelm@gmx.net>
Date: Wed, 29 Jun 2022 16:15:47 +0200
Subject: [PATCH] scrrun: Test MoveFolder with already existing destination.
Signed-off-by: Robert Wilhelm <robert.wilhelm@gmx.net>
---
dlls/scrrun/tests/filesystem.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/dlls/scrrun/tests/filesystem.c b/dlls/scrrun/tests/filesystem.c
index 3ddd782a6fe..4305ac394e6 100644
--- a/dlls/scrrun/tests/filesystem.c
+++ b/dlls/scrrun/tests/filesystem.c
@@ -2669,6 +2669,17 @@ static void test_MoveFolder(void)
ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
SysFreeString(empty);
+
+ ok(CreateDirectoryW(buffW1, NULL), "CreateDirectory(%s) failed\n", wine_dbgstr_w(buffW1));
+ ok(CreateDirectoryW(buffW2, NULL), "CreateDirectory(%s) failed\n", wine_dbgstr_w(buffW2));
+ src = SysAllocString(buffW1);
+ dst = SysAllocString(buffW2);
+ hr = IFileSystem3_MoveFolder(fs3, src, dst); /* dst already exists */
+ ok(hr == CTL_E_FILEALREADYEXISTS, "Unexpected hr %#lx.\n", hr);
+ SysFreeString(src);
+ SysFreeString(dst);
+ ok(RemoveDirectoryW(buffW1), "can't remove %s directory\n", wine_dbgstr_w(buffW1));
+ ok(RemoveDirectoryW(buffW2), "can't remove %s directory\n", wine_dbgstr_w(buffW2));
}
static void test_DoOpenPipeStream(void)
--
2.43.0

View File

@@ -0,0 +1,66 @@
From bbf3d65137f48e763a8a7e4c1eee1dcaed657fd9 Mon Sep 17 00:00:00 2001
From: Robert Wilhelm <robert.wilhelm@gmx.net>
Date: Wed, 29 Jun 2022 16:24:40 +0200
Subject: [PATCH] scrrun: Check for non-existant source in MoveFolder().
Signed-off-by: Robert Wilhelm <robert.wilhelm@gmx.net>
---
dlls/scrrun/filesystem.c | 16 +++++++++++++++-
dlls/scrrun/tests/filesystem.c | 7 +++++++
2 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/dlls/scrrun/filesystem.c b/dlls/scrrun/filesystem.c
index a56af2f0461..5c4b13d48b8 100644
--- a/dlls/scrrun/filesystem.c
+++ b/dlls/scrrun/filesystem.c
@@ -3803,6 +3803,20 @@ static HRESULT WINAPI filesys_MoveFile(IFileSystem3 *iface, BSTR source, BSTR de
return MoveFileW(source, destination) ? S_OK : create_error(GetLastError());
}
+static inline HRESULT create_movefolder_error(DWORD err)
+{
+ switch(err) {
+ case ERROR_FILE_NOT_FOUND:
+ case ERROR_PATH_NOT_FOUND: return CTL_E_PATHNOTFOUND;
+ case ERROR_ACCESS_DENIED: return CTL_E_PERMISSIONDENIED;
+ case ERROR_FILE_EXISTS: return CTL_E_FILEALREADYEXISTS;
+ case ERROR_ALREADY_EXISTS: return CTL_E_FILEALREADYEXISTS;
+ default:
+ FIXME("Unsupported error code: %ld\n", err);
+ return E_FAIL;
+ }
+}
+
static HRESULT WINAPI filesys_MoveFolder(IFileSystem3 *iface, BSTR source, BSTR destination)
{
TRACE("%p %s %s\n", iface, debugstr_w(source), debugstr_w(destination));
@@ -3810,7 +3824,7 @@ static HRESULT WINAPI filesys_MoveFolder(IFileSystem3 *iface, BSTR source, BSTR
if(!source || !source[0] || !destination || !destination[0])
return E_INVALIDARG;
- return MoveFileW(source, destination) ? S_OK : create_error(GetLastError());
+ return MoveFileW(source, destination) ? S_OK : create_movefolder_error(GetLastError());
}
static inline HRESULT copy_file(const WCHAR *source, DWORD source_len,
diff --git a/dlls/scrrun/tests/filesystem.c b/dlls/scrrun/tests/filesystem.c
index 4305ac394e6..9b352797073 100644
--- a/dlls/scrrun/tests/filesystem.c
+++ b/dlls/scrrun/tests/filesystem.c
@@ -2680,6 +2680,13 @@ static void test_MoveFolder(void)
SysFreeString(dst);
ok(RemoveDirectoryW(buffW1), "can't remove %s directory\n", wine_dbgstr_w(buffW1));
ok(RemoveDirectoryW(buffW2), "can't remove %s directory\n", wine_dbgstr_w(buffW2));
+
+ src = SysAllocString(buffW1);
+ dst = SysAllocString(buffW2);
+ hr = IFileSystem3_MoveFolder(fs3, src, dst); /* src nonexistant */
+ ok(hr == CTL_E_PATHNOTFOUND, "Unexpected hr %#lx.\n", hr);
+ SysFreeString(src);
+ SysFreeString(dst);
}
static void test_DoOpenPipeStream(void)
--
2.43.0

View File

@@ -0,0 +1,79 @@
From e7ce13576f0ef1b73622a32568fce45eda879613 Mon Sep 17 00:00:00 2001
From: Robert Wilhelm <robert.wilhelm@gmx.net>
Date: Wed, 29 Jun 2022 16:29:55 +0200
Subject: [PATCH] scrrun: Check that source is directory in MoveFolder().
Signed-off-by: Robert Wilhelm <robert.wilhelm@gmx.net>
---
dlls/scrrun/filesystem.c | 10 +++++++++-
dlls/scrrun/tests/filesystem.c | 14 ++++++++++++++
2 files changed, 23 insertions(+), 1 deletion(-)
diff --git a/dlls/scrrun/filesystem.c b/dlls/scrrun/filesystem.c
index 5c4b13d48b8..72a15aae545 100644
--- a/dlls/scrrun/filesystem.c
+++ b/dlls/scrrun/filesystem.c
@@ -3806,6 +3806,7 @@ static HRESULT WINAPI filesys_MoveFile(IFileSystem3 *iface, BSTR source, BSTR de
static inline HRESULT create_movefolder_error(DWORD err)
{
switch(err) {
+ case ERROR_INVALID_NAME:
case ERROR_FILE_NOT_FOUND:
case ERROR_PATH_NOT_FOUND: return CTL_E_PATHNOTFOUND;
case ERROR_ACCESS_DENIED: return CTL_E_PERMISSIONDENIED;
@@ -3819,12 +3820,19 @@ static inline HRESULT create_movefolder_error(DWORD err)
static HRESULT WINAPI filesys_MoveFolder(IFileSystem3 *iface, BSTR source, BSTR destination)
{
+ int len;
+ WCHAR src_path[MAX_PATH];
+
TRACE("%p %s %s\n", iface, debugstr_w(source), debugstr_w(destination));
if(!source || !source[0] || !destination || !destination[0])
return E_INVALIDARG;
- return MoveFileW(source, destination) ? S_OK : create_movefolder_error(GetLastError());
+ len = SysStringLen(source);
+ lstrcpyW(src_path, source);
+ if (source[len-1] != '\\' && source[len-1] != '/') wcscat(src_path, L"\\");
+
+ return MoveFileW(src_path, destination) ? S_OK : create_movefolder_error(GetLastError());
}
static inline HRESULT copy_file(const WCHAR *source, DWORD source_len,
diff --git a/dlls/scrrun/tests/filesystem.c b/dlls/scrrun/tests/filesystem.c
index 9b352797073..0236a02aa74 100644
--- a/dlls/scrrun/tests/filesystem.c
+++ b/dlls/scrrun/tests/filesystem.c
@@ -2644,6 +2644,7 @@ static void test_MoveFolder(void)
BSTR src, dst, str, empty;
WCHAR buffW1[MAX_PATH],buffW2[MAX_PATH];
HRESULT hr;
+ HANDLE file;
get_temp_path(L"foo", buffW1);
get_temp_path(L"bar", buffW2);
@@ -2687,6 +2688,19 @@ static void test_MoveFolder(void)
ok(hr == CTL_E_PATHNOTFOUND, "Unexpected hr %#lx.\n", hr);
SysFreeString(src);
SysFreeString(dst);
+
+ file = CreateFileW(buffW1, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS,
+ FILE_ATTRIBUTE_NORMAL, NULL);
+ ok(file != INVALID_HANDLE_VALUE, "CreateFile failed\n");
+ CloseHandle(file);
+
+ src = SysAllocString(buffW1);
+ dst = SysAllocString(buffW2);
+ hr = IFileSystem3_MoveFolder(fs3, src, dst); /* src is regular file */
+ ok(hr == CTL_E_PATHNOTFOUND, "Unexpected hr %#lx.\n", hr);
+ SysFreeString(src);
+ SysFreeString(dst);
+ DeleteFileW(buffW1);
}
static void test_DoOpenPipeStream(void)
--
2.43.0

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