You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-04-13 14:42:51 -07:00
Compare commits
42 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
6cfd7b70ba | ||
|
8de9c65504 | ||
|
f04ae5b1da | ||
|
0501c71fce | ||
|
690a18a601 | ||
|
eb09d462e2 | ||
|
3161e5be34 | ||
|
17083b95bb | ||
|
50f0724f43 | ||
|
54f9a82de8 | ||
|
fe96596a19 | ||
|
929bc28ac8 | ||
|
a7ad40c135 | ||
|
4d4e02e26b | ||
|
40821d91e2 | ||
|
9256515a12 | ||
|
ae1f954ed1 | ||
|
ccad76f64a | ||
|
b1066c7064 | ||
|
b636153ec4 | ||
|
f8064b4dbe | ||
|
b7a4aade29 | ||
|
9e8d000f35 | ||
|
42b756066b | ||
|
ee381d1ad0 | ||
|
9a858d4f4c | ||
|
3878c8eb1b | ||
|
5020088406 | ||
|
c119ae9eeb | ||
|
476caa4a5f | ||
|
9982d2e0ee | ||
|
2b2bf8ac06 | ||
|
088524a29e | ||
|
31d525e567 | ||
|
7d26828643 | ||
|
3dc3c4e0e2 | ||
|
154875b4e9 | ||
|
66148cb9b2 | ||
|
cfbf5f7b86 | ||
|
6f1b2ab35a | ||
|
550e67b8a2 | ||
|
e45211698d |
@@ -1362,7 +1362,7 @@ index c930248..80f73de 100644
|
||||
+ object->device = iface;
|
||||
+ object->refcount = 1;
|
||||
+
|
||||
+ ID3D11Device_AddRef(iface);
|
||||
+ ID3D11Device2_AddRef(iface);
|
||||
+ wined3d_private_store_init(&object->private_store);
|
||||
+
|
||||
+ *context = &object->ID3D11DeviceContext_iface;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From b8d301b085b39fba7f61409a0ebe17a4ff7b810a Mon Sep 17 00:00:00 2001
|
||||
From 07c70b0b20919d9908b408322d65c62ad459f09e 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.
|
||||
@@ -8,7 +8,7 @@ Subject: [PATCH] d3d11: Initial implementation for deferred contexts.
|
||||
1 file changed, 1040 insertions(+), 31 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
|
||||
index 9127d01..94156e4 100644
|
||||
index ebe8c03..791b959 100644
|
||||
--- a/dlls/d3d11/device.c
|
||||
+++ b/dlls/d3d11/device.c
|
||||
@@ -19,12 +19,181 @@
|
||||
@@ -725,7 +725,7 @@ index 9127d01..94156e4 100644
|
||||
static void STDMETHODCALLTYPE d3d_null_wined3d_object_destroyed(void *parent) {}
|
||||
|
||||
static const struct wined3d_parent_ops d3d_null_wined3d_parent_ops =
|
||||
@@ -1217,7 +1908,20 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_ResolveSubresource(ID3D11D
|
||||
@@ -1221,7 +1912,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 9127d01..94156e4 100644
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_immediate_context_HSSetShaderResources(ID3D11DeviceContext1 *iface,
|
||||
@@ -2972,6 +3676,7 @@ static ULONG STDMETHODCALLTYPE d3d11_deferred_context_Release(ID3D11DeviceContex
|
||||
@@ -2855,6 +3559,7 @@ static ULONG STDMETHODCALLTYPE d3d11_deferred_context_Release(ID3D11DeviceContex
|
||||
|
||||
if (!refcount)
|
||||
{
|
||||
@@ -755,7 +755,7 @@ index 9127d01..94156e4 100644
|
||||
wined3d_private_store_cleanup(&context->private_store);
|
||||
ID3D11Device_Release(context->device);
|
||||
HeapFree(GetProcessHeap(), 0, context);
|
||||
@@ -3023,43 +3728,86 @@ static HRESULT STDMETHODCALLTYPE d3d11_deferred_context_SetPrivateDataInterface(
|
||||
@@ -2906,43 +3611,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 9127d01..94156e4 100644
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_Draw(ID3D11DeviceContext *iface,
|
||||
@@ -3072,53 +3820,169 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_Draw(ID3D11DeviceContext *i
|
||||
@@ -2955,53 +3703,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 9127d01..94156e4 100644
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_DrawInstanced(ID3D11DeviceContext *iface,
|
||||
@@ -3147,7 +4011,16 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_GSSetShader(ID3D11DeviceCon
|
||||
@@ -3030,7 +3894,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 9127d01..94156e4 100644
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_VSSetShaderResources(ID3D11DeviceContext *iface,
|
||||
@@ -3207,8 +4080,28 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_OMSetRenderTargets(ID3D11De
|
||||
@@ -3090,8 +3963,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 9127d01..94156e4 100644
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_OMSetRenderTargetsAndUnorderedAccessViews(
|
||||
@@ -3228,15 +4121,44 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_OMSetRenderTargetsAndUnorde
|
||||
@@ -3111,15 +4004,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 9127d01..94156e4 100644
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_SOSetTargets(ID3D11DeviceContext *iface, UINT buffer_count,
|
||||
@@ -3278,13 +4200,34 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_DispatchIndirect(ID3D11Devi
|
||||
@@ -3161,13 +4083,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 9127d01..94156e4 100644
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_RSSetScissorRects(ID3D11DeviceContext *iface,
|
||||
@@ -3399,8 +4342,18 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_HSSetShaderResources(ID3D11
|
||||
@@ -3282,8 +4225,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 9127d01..94156e4 100644
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_HSSetSamplers(ID3D11DeviceContext *iface,
|
||||
@@ -3413,36 +4366,62 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_HSSetSamplers(ID3D11DeviceC
|
||||
@@ -3296,36 +4249,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 9127d01..94156e4 100644
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_CSSetShaderResources(ID3D11DeviceContext *iface,
|
||||
@@ -3743,7 +4722,15 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_CSGetConstantBuffers(ID3D11
|
||||
@@ -3626,7 +4605,15 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_CSGetConstantBuffers(ID3D11
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_ClearState(ID3D11DeviceContext *iface)
|
||||
{
|
||||
@@ -1264,7 +1264,7 @@ index 9127d01..94156e4 100644
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_Flush(ID3D11DeviceContext *iface)
|
||||
@@ -3768,9 +4755,29 @@ static UINT STDMETHODCALLTYPE d3d11_deferred_context_GetContextFlags(ID3D11Devic
|
||||
@@ -3651,9 +4638,29 @@ static UINT STDMETHODCALLTYPE d3d11_deferred_context_GetContextFlags(ID3D11Devic
|
||||
static HRESULT STDMETHODCALLTYPE d3d11_deferred_context_FinishCommandList(ID3D11DeviceContext *iface,
|
||||
BOOL restore, ID3D11CommandList **command_list)
|
||||
{
|
||||
@@ -1296,13 +1296,13 @@ index 9127d01..94156e4 100644
|
||||
}
|
||||
|
||||
static const struct ID3D11DeviceContextVtbl d3d11_deferred_context_vtbl =
|
||||
@@ -4385,6 +5392,8 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateDeferredContext(ID3D11Device
|
||||
@@ -4268,6 +5275,8 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateDeferredContext(ID3D11Device
|
||||
object->device = iface;
|
||||
object->refcount = 1;
|
||||
|
||||
+ list_init(&object->commands);
|
||||
+
|
||||
ID3D11Device_AddRef(iface);
|
||||
ID3D11Device2_AddRef(iface);
|
||||
wined3d_private_store_init(&object->private_store);
|
||||
|
||||
--
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 8397d7b777db5ef44825b639d4009f6e372ca9ad Mon Sep 17 00:00:00 2001
|
||||
From 1b741a4b555ad98a769fdb9fa659134b83293a4e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Fri, 4 Mar 2016 22:22:42 +0100
|
||||
Subject: [PATCH] ddraw: Set ddsOldCaps correctly in ddraw7_GetCaps.
|
||||
@@ -12,10 +12,10 @@ Subject: [PATCH] ddraw: Set ddsOldCaps correctly in ddraw7_GetCaps.
|
||||
5 files changed, 106 insertions(+)
|
||||
|
||||
diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c
|
||||
index 8247214..d70f2e2 100644
|
||||
index fad185e..ebf91b3 100644
|
||||
--- a/dlls/ddraw/ddraw.c
|
||||
+++ b/dlls/ddraw/ddraw.c
|
||||
@@ -1544,6 +1544,8 @@ static HRESULT WINAPI ddraw7_GetCaps(IDirectDraw7 *iface, DDCAPS *DriverCaps, DD
|
||||
@@ -1543,6 +1543,8 @@ static HRESULT WINAPI ddraw7_GetCaps(IDirectDraw7 *iface, DDCAPS *DriverCaps, DD
|
||||
caps.dwCaps |= DDCAPS_ALIGNSTRIDE;
|
||||
caps.dwAlignStrideAlign = DDRAW_STRIDE_ALIGNMENT;
|
||||
|
||||
@@ -25,10 +25,10 @@ index 8247214..d70f2e2 100644
|
||||
|
||||
if(DriverCaps)
|
||||
diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c
|
||||
index 1f93a97..9a862e1 100644
|
||||
index 59d07b7..5d81abb 100644
|
||||
--- a/dlls/ddraw/tests/ddraw1.c
|
||||
+++ b/dlls/ddraw/tests/ddraw1.c
|
||||
@@ -11543,6 +11543,31 @@ static void test_execute_data(void)
|
||||
@@ -11581,6 +11581,31 @@ static void test_execute_data(void)
|
||||
DestroyWindow(window);
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ index 1f93a97..9a862e1 100644
|
||||
static void test_viewport(void)
|
||||
{
|
||||
static struct
|
||||
@@ -12030,6 +12055,7 @@ START_TEST(ddraw1)
|
||||
@@ -12068,6 +12093,7 @@ START_TEST(ddraw1)
|
||||
test_depth_readback();
|
||||
test_clear();
|
||||
test_enum_surfaces();
|
||||
@@ -69,10 +69,10 @@ index 1f93a97..9a862e1 100644
|
||||
test_viewport();
|
||||
test_find_device();
|
||||
diff --git a/dlls/ddraw/tests/ddraw2.c b/dlls/ddraw/tests/ddraw2.c
|
||||
index 95cdf8b..d317cc1 100644
|
||||
index 8b9b249..b9b964d 100644
|
||||
--- a/dlls/ddraw/tests/ddraw2.c
|
||||
+++ b/dlls/ddraw/tests/ddraw2.c
|
||||
@@ -12805,6 +12805,31 @@ static void test_enum_surfaces(void)
|
||||
@@ -12862,6 +12862,31 @@ static void test_enum_surfaces(void)
|
||||
IDirectDraw2_Release(ddraw);
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ index 95cdf8b..d317cc1 100644
|
||||
static void test_viewport(void)
|
||||
{
|
||||
static struct
|
||||
@@ -13321,6 +13346,7 @@ START_TEST(ddraw2)
|
||||
@@ -13378,6 +13403,7 @@ START_TEST(ddraw2)
|
||||
test_depth_readback();
|
||||
test_clear();
|
||||
test_enum_surfaces();
|
||||
@@ -113,11 +113,11 @@ index 95cdf8b..d317cc1 100644
|
||||
test_find_device();
|
||||
test_killfocus();
|
||||
diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c
|
||||
index a62aaf0..e11ec0c 100644
|
||||
index 1c48418..306f233 100644
|
||||
--- a/dlls/ddraw/tests/ddraw4.c
|
||||
+++ b/dlls/ddraw/tests/ddraw4.c
|
||||
@@ -15318,6 +15318,31 @@ static void test_killfocus(void)
|
||||
UnregisterClassA("ddraw_killfocus_wndproc_wc", GetModuleHandleA(NULL));
|
||||
@@ -15472,6 +15472,31 @@ static void test_sysmem_draw(void)
|
||||
DestroyWindow(window);
|
||||
}
|
||||
|
||||
+static void test_caps(void)
|
||||
@@ -148,7 +148,7 @@ index a62aaf0..e11ec0c 100644
|
||||
START_TEST(ddraw4)
|
||||
{
|
||||
DDDEVICEIDENTIFIER identifier;
|
||||
@@ -15443,6 +15468,7 @@ START_TEST(ddraw4)
|
||||
@@ -15597,6 +15622,7 @@ START_TEST(ddraw4)
|
||||
test_depth_readback();
|
||||
test_clear();
|
||||
test_enum_surfaces();
|
||||
@@ -157,11 +157,11 @@ index a62aaf0..e11ec0c 100644
|
||||
test_find_device();
|
||||
test_killfocus();
|
||||
diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c
|
||||
index 04048d4..ad4f63d 100644
|
||||
index a125200..da777d8 100644
|
||||
--- a/dlls/ddraw/tests/ddraw7.c
|
||||
+++ b/dlls/ddraw/tests/ddraw7.c
|
||||
@@ -15106,6 +15106,31 @@ static void test_killfocus(void)
|
||||
UnregisterClassA("ddraw_killfocus_wndproc_wc", GetModuleHandleA(NULL));
|
||||
@@ -15198,6 +15198,31 @@ static void test_sysmem_draw(void)
|
||||
DestroyWindow(window);
|
||||
}
|
||||
|
||||
+static void test_caps(void)
|
||||
@@ -192,14 +192,14 @@ index 04048d4..ad4f63d 100644
|
||||
START_TEST(ddraw7)
|
||||
{
|
||||
DDDEVICEIDENTIFIER2 identifier;
|
||||
@@ -15243,6 +15268,7 @@ START_TEST(ddraw7)
|
||||
@@ -15335,6 +15360,7 @@ START_TEST(ddraw7)
|
||||
test_enum_surfaces();
|
||||
test_viewport();
|
||||
test_device_load();
|
||||
+ test_caps();
|
||||
test_color_vertex();
|
||||
test_killfocus();
|
||||
}
|
||||
test_sysmem_draw();
|
||||
--
|
||||
1.9.1
|
||||
|
||||
|
@@ -198,7 +198,7 @@ index 8190442..c73981b 100644
|
||||
+ bind_flags, WINED3D_RTYPE_TEXTURE_2D, wined3d_desc.format)))
|
||||
+ {
|
||||
+ FIXME("Application wants to create rendering target in system memory, using video memory instead\n");
|
||||
+ wined3d_desc.usage = wined3d_desc.bind_flags;
|
||||
+ wined3d_desc.bind_flags = bind_flags;
|
||||
+ }
|
||||
+ else
|
||||
+ wined3d_desc.access = WINED3D_RESOURCE_ACCESS_CPU
|
||||
|
@@ -0,0 +1,43 @@
|
||||
From: Louis Lenders <xerox.xerox2000x@gmail.com>
|
||||
Subject: [PATCH 1/2] dwmapi: return DWM_E_COMPOSITIONDISABLED instead of E_NOTIMPL in DwmGetTransportAttributes
|
||||
Message-Id: <20181205121826.2124-1-xerox.xerox2000x@gmail.com>
|
||||
Date: Wed, 5 Dec 2018 13:18:25 +0100
|
||||
|
||||
This versioh is with tests;
|
||||
|
||||
Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com>
|
||||
---
|
||||
dlls/dwmapi/dwmapi_main.c | 2 +-
|
||||
include/winerror.h | 2 ++
|
||||
2 files changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/dwmapi/dwmapi_main.c b/dlls/dwmapi/dwmapi_main.c
|
||||
index c1ee067122..eb06d15507 100644
|
||||
--- a/dlls/dwmapi/dwmapi_main.c
|
||||
+++ b/dlls/dwmapi/dwmapi_main.c
|
||||
@@ -146,7 +146,7 @@ HRESULT WINAPI DwmGetTransportAttributes(BOOL *pfIsRemoting, BOOL *pfIsConnected
|
||||
{
|
||||
FIXME("(%p, %p, %p) stub\n", pfIsRemoting, pfIsConnected, pDwGeneration);
|
||||
|
||||
- return E_NOTIMPL;
|
||||
+ return DWM_E_COMPOSITIONDISABLED;
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
diff --git a/include/winerror.h b/include/winerror.h
|
||||
index d78c91e84e..a97b405c34 100644
|
||||
--- a/include/winerror.h
|
||||
+++ b/include/winerror.h
|
||||
@@ -3090,6 +3090,8 @@ static inline HRESULT HRESULT_FROM_WIN32(unsigned int x)
|
||||
#define WININET_E_LOGIN_FAILURE_DISPLAY_ENTITY_BODY _HRESULT_TYPEDEF_(0x80072f8e)
|
||||
#define WININET_E_DECODING_FAILED _HRESULT_TYPEDEF_(0x80072f8f)
|
||||
|
||||
+#define DWM_E_COMPOSITIONDISABLED _HRESULT_TYPEDEF_(0x80263001)
|
||||
+
|
||||
#define D3D11_ERROR_TOO_MANY_UNIQUE_STATE_OBJECTS _HRESULT_TYPEDEF_(0x887c0001)
|
||||
#define D3D11_ERROR_FILE_NOT_FOUND _HRESULT_TYPEDEF_(0x887c0002)
|
||||
#define D3D11_ERROR_TOO_MANY_UNIQUE_VIEW_OBJECTS _HRESULT_TYPEDEF_(0x887c0003)
|
||||
|
||||
--
|
||||
2.17.1
|
||||
|
@@ -0,0 +1,185 @@
|
||||
From: Louis Lenders <xerox.xerox2000x@gmail.com>
|
||||
Subject: [PATCH 2/2] dwampi: add initial tests
|
||||
Message-Id: <20181205121826.2124-2-xerox.xerox2000x@gmail.com>
|
||||
Date: Wed, 5 Dec 2018 13:18:26 +0100
|
||||
In-Reply-To: <20181205121826.2124-1-xerox.xerox2000x@gmail.com>
|
||||
References: <20181205121826.2124-1-xerox.xerox2000x@gmail.com>
|
||||
|
||||
Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com>
|
||||
---
|
||||
configure | 1 +
|
||||
configure.ac | 1 +
|
||||
dlls/dwmapi/tests/Makefile.in | 5 ++
|
||||
dlls/dwmapi/tests/dwmapi.c | 108 ++++++++++++++++++++++++++++++++++
|
||||
include/dwmapi.h | 3 +
|
||||
5 files changed, 118 insertions(+)
|
||||
create mode 100644 dlls/dwmapi/tests/Makefile.in
|
||||
create mode 100644 dlls/dwmapi/tests/dwmapi.c
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index d00057ba2f..e1dde1813b 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -19392,6 +19392,7 @@ wine_fn_config_makefile dlls/dssenh/tests enable_tests
|
||||
wine_fn_config_makefile dlls/dswave enable_dswave
|
||||
wine_fn_config_makefile dlls/dswave/tests enable_tests
|
||||
wine_fn_config_makefile dlls/dwmapi enable_dwmapi
|
||||
+wine_fn_config_makefile dlls/dwmapi/tests enable_tests
|
||||
wine_fn_config_makefile dlls/dwrite enable_dwrite
|
||||
wine_fn_config_makefile dlls/dwrite/tests enable_tests
|
||||
wine_fn_config_makefile dlls/dx8vb enable_dx8vb
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 50cf9a0bd0..607a46f5a9 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -3255,6 +3255,7 @@ WINE_CONFIG_MAKEFILE(dlls/dssenh/tests)
|
||||
WINE_CONFIG_MAKEFILE(dlls/dswave)
|
||||
WINE_CONFIG_MAKEFILE(dlls/dswave/tests)
|
||||
WINE_CONFIG_MAKEFILE(dlls/dwmapi)
|
||||
+WINE_CONFIG_MAKEFILE(dlls/dwmapi/tests)
|
||||
WINE_CONFIG_MAKEFILE(dlls/dwrite)
|
||||
WINE_CONFIG_MAKEFILE(dlls/dwrite/tests)
|
||||
WINE_CONFIG_MAKEFILE(dlls/dx8vb)
|
||||
diff --git a/dlls/dwmapi/tests/Makefile.in b/dlls/dwmapi/tests/Makefile.in
|
||||
new file mode 100644
|
||||
index 0000000000..f365f96c72
|
||||
--- /dev/null
|
||||
+++ b/dlls/dwmapi/tests/Makefile.in
|
||||
@@ -0,0 +1,5 @@
|
||||
+TESTDLL = dwmapi.dll
|
||||
+IMPORTS = dwmapi
|
||||
+
|
||||
+C_SRCS = \
|
||||
+ dwmapi.c
|
||||
diff --git a/dlls/dwmapi/tests/dwmapi.c b/dlls/dwmapi/tests/dwmapi.c
|
||||
new file mode 100644
|
||||
index 0000000000..fe5ee33996
|
||||
--- /dev/null
|
||||
+++ b/dlls/dwmapi/tests/dwmapi.c
|
||||
@@ -0,0 +1,108 @@
|
||||
+/*
|
||||
+ * Unit tests for dwmapi
|
||||
+ *
|
||||
+ * Copyright 2018 Louis Lenders
|
||||
+ *
|
||||
+ * This library is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU Lesser General Public
|
||||
+ * License as published by the Free Software Foundation; either
|
||||
+ * version 2.1 of the License, or (at your option) any later version.
|
||||
+ *
|
||||
+ * This library is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ * Lesser General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU Lesser General Public
|
||||
+ * License along with this library; if not, write to the Free Software
|
||||
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
+ *
|
||||
+ */
|
||||
+
|
||||
+#include "dwmapi.h"
|
||||
+
|
||||
+#include "wine/test.h"
|
||||
+
|
||||
+static HRESULT (WINAPI *pDwmIsCompositionEnabled)(BOOL*);
|
||||
+static HRESULT (WINAPI *pDwmEnableComposition)(UINT);
|
||||
+static HRESULT (WINAPI *pDwmGetTransportAttributes)(BOOL*,BOOL*,DWORD*);
|
||||
+
|
||||
+BOOL dwmenabled;
|
||||
+
|
||||
+static void test_isdwmenabled(void)
|
||||
+{
|
||||
+ HRESULT res;
|
||||
+ BOOL ret;
|
||||
+
|
||||
+ ret = -1;
|
||||
+ res = pDwmIsCompositionEnabled(&ret);
|
||||
+ ok((res == S_OK && ret == TRUE) || (res == S_OK && ret == FALSE), "got %x and %d\n", res, ret);
|
||||
+
|
||||
+ if (res == S_OK && ret == TRUE)
|
||||
+ dwmenabled = TRUE;
|
||||
+ else
|
||||
+ dwmenabled = FALSE;
|
||||
+ /*tested on win7 by enabling/disabling DWM service via services.msc*/
|
||||
+ if (dwmenabled)
|
||||
+ {
|
||||
+ res = pDwmEnableComposition(DWM_EC_DISABLECOMPOSITION); /* try disable and reenable dwm*/
|
||||
+ ok(res == S_OK, "got %x expected S_OK\n", res);
|
||||
+
|
||||
+ ret = -1;
|
||||
+ res = pDwmIsCompositionEnabled(&ret);
|
||||
+ ok((res == S_OK && ret == FALSE) /*wvista win7*/ || (res == S_OK && ret == TRUE) /*>win7*/, "got %x and %d\n", res, ret);
|
||||
+
|
||||
+ res = pDwmEnableComposition(DWM_EC_ENABLECOMPOSITION);
|
||||
+ ok(res == S_OK, "got %x\n", res);
|
||||
+
|
||||
+ ret = -1;
|
||||
+ res = pDwmIsCompositionEnabled(&ret);
|
||||
+ todo_wine ok(res == S_OK && ret == TRUE, "got %x and %d\n", res, ret);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ res = pDwmEnableComposition(DWM_EC_ENABLECOMPOSITION); /*cannot enable DWM composition this way*/
|
||||
+ ok(res == S_OK /*win7 testbot*/ || res == DWM_E_COMPOSITIONDISABLED /*win7 laptop*/, "got %x\n", res);
|
||||
+ if (winetest_debug > 1)
|
||||
+ trace("returning %x\n", res);
|
||||
+
|
||||
+ ret = -1;
|
||||
+ res = pDwmIsCompositionEnabled(&ret);
|
||||
+ ok(res == S_OK && ret == FALSE, "got %x and %d\n", res, ret);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static void test_dwm_get_transport_attributes(void)
|
||||
+{
|
||||
+ BOOL isremoting, isconnected;
|
||||
+ DWORD generation;
|
||||
+ HRESULT res;
|
||||
+
|
||||
+ res = pDwmGetTransportAttributes(&isremoting, &isconnected, &generation);
|
||||
+ if (dwmenabled)
|
||||
+ ok(res == S_OK, "got %x\n", res);
|
||||
+ else
|
||||
+ {
|
||||
+ ok(res == S_OK /*win7 testbot*/ || res == DWM_E_COMPOSITIONDISABLED /*win7 laptop*/, "got %x\n", res);
|
||||
+ if (winetest_debug > 1)
|
||||
+ trace("returning %x\n", res);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+START_TEST(dwmapi)
|
||||
+{
|
||||
+ HMODULE hmod = LoadLibraryA("dwmapi.dll");
|
||||
+
|
||||
+ if (!hmod)
|
||||
+ {
|
||||
+ trace("dwmapi not found, skipping tests\n");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ pDwmIsCompositionEnabled = (void *)GetProcAddress(hmod, "DwmIsCompositionEnabled");
|
||||
+ pDwmEnableComposition = (void *)GetProcAddress(hmod, "DwmEnableComposition");
|
||||
+ pDwmGetTransportAttributes = (void *)GetProcAddress(hmod, "DwmGetTransportAttributes");
|
||||
+
|
||||
+ test_isdwmenabled();
|
||||
+ test_dwm_get_transport_attributes();
|
||||
+}
|
||||
diff --git a/include/dwmapi.h b/include/dwmapi.h
|
||||
index b2f39deae5..12527aee62 100644
|
||||
--- a/include/dwmapi.h
|
||||
+++ b/include/dwmapi.h
|
||||
@@ -101,6 +101,9 @@ typedef struct _MilMatrix3x2D
|
||||
DOUBLE DY;
|
||||
} MilMatrix3x2D;
|
||||
|
||||
+#define DWM_EC_DISABLECOMPOSITION 0
|
||||
+#define DWM_EC_ENABLECOMPOSITION 1
|
||||
+
|
||||
#define DWM_BB_ENABLE 0x00000001
|
||||
#define DWM_BB_BLURREGION 0x00000002
|
||||
#define DWM_BB_TRANSITIONONMAXIMIZED 0x00000004
|
||||
|
||||
--
|
||||
2.17.1
|
||||
|
1
patches/dwmapi-DwmGetTransportAttributes/definition
Normal file
1
patches/dwmapi-DwmGetTransportAttributes/definition
Normal file
@@ -0,0 +1 @@
|
||||
Fixes: [31350] T-Online Mediencenter Assistent (.NET 3.5 WPF app) installer fails ('dwmapi.dll' stubs insufficient in Vista/Win7 mode)
|
@@ -1,8 +1,8 @@
|
||||
From ed8b8ed961c31b68abc5fb266d872f7228e02b93 Mon Sep 17 00:00:00 2001
|
||||
From 93ec896e73fe1b9ad7100e4ea22086e940eb8ef4 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sat, 15 Aug 2015 07:41:17 +0200
|
||||
Subject: gdi32: Perform lazy initialization of fonts to improve startup
|
||||
performance.
|
||||
Subject: [PATCH] gdi32: Perform lazy initialization of fonts to improve
|
||||
startup performance.
|
||||
|
||||
---
|
||||
dlls/gdi32/dc.c | 8 +++-----
|
||||
@@ -10,10 +10,10 @@ Subject: gdi32: Perform lazy initialization of fonts to improve startup
|
||||
2 files changed, 37 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/dlls/gdi32/dc.c b/dlls/gdi32/dc.c
|
||||
index 5146f5b..91ad953 100644
|
||||
index 8ee8a52..208c220 100644
|
||||
--- a/dlls/gdi32/dc.c
|
||||
+++ b/dlls/gdi32/dc.c
|
||||
@@ -147,11 +147,9 @@ DC *alloc_dc_ptr( WORD magic )
|
||||
@@ -148,11 +148,9 @@ DC *alloc_dc_ptr( WORD magic )
|
||||
}
|
||||
dc->nulldrv.hdc = dc->hSelf;
|
||||
|
||||
@@ -29,7 +29,7 @@ index 5146f5b..91ad953 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c
|
||||
index de40d9f..d4eb837 100644
|
||||
index 9f6bdfe..492d29e 100644
|
||||
--- a/dlls/gdi32/freetype.c
|
||||
+++ b/dlls/gdi32/freetype.c
|
||||
@@ -110,6 +110,9 @@
|
||||
@@ -42,7 +42,7 @@ index de40d9f..d4eb837 100644
|
||||
#ifdef HAVE_FREETYPE
|
||||
|
||||
#ifndef HAVE_FT_TRUETYPEENGINETYPE
|
||||
@@ -3176,6 +3179,7 @@ INT WineEngAddFontResourceEx(LPCWSTR file, DWORD flags, PVOID pdv)
|
||||
@@ -3264,6 +3267,7 @@ INT WineEngAddFontResourceEx(LPCWSTR file, DWORD flags, PVOID pdv)
|
||||
{
|
||||
INT ret = 0;
|
||||
|
||||
@@ -50,7 +50,7 @@ index de40d9f..d4eb837 100644
|
||||
GDI_CheckNotLock();
|
||||
|
||||
if (ft_handle) /* do it only if we have freetype up and running */
|
||||
@@ -3218,6 +3222,7 @@ INT WineEngAddFontResourceEx(LPCWSTR file, DWORD flags, PVOID pdv)
|
||||
@@ -3306,6 +3310,7 @@ INT WineEngAddFontResourceEx(LPCWSTR file, DWORD flags, PVOID pdv)
|
||||
*/
|
||||
HANDLE WineEngAddFontMemResourceEx(PVOID pbFont, DWORD cbFont, PVOID pdv, DWORD *pcFonts)
|
||||
{
|
||||
@@ -58,7 +58,7 @@ index de40d9f..d4eb837 100644
|
||||
GDI_CheckNotLock();
|
||||
|
||||
if (ft_handle) /* do it only if we have freetype up and running */
|
||||
@@ -3256,6 +3261,7 @@ BOOL WineEngRemoveFontResourceEx(LPCWSTR file, DWORD flags, PVOID pdv)
|
||||
@@ -3344,6 +3349,7 @@ BOOL WineEngRemoveFontResourceEx(LPCWSTR file, DWORD flags, PVOID pdv)
|
||||
{
|
||||
INT ret = 0;
|
||||
|
||||
@@ -66,7 +66,7 @@ index de40d9f..d4eb837 100644
|
||||
GDI_CheckNotLock();
|
||||
|
||||
if (ft_handle) /* do it only if we have freetype up and running */
|
||||
@@ -3577,10 +3583,13 @@ static BOOL create_fot( const WCHAR *resource, const WCHAR *font_file, const str
|
||||
@@ -3665,10 +3671,13 @@ static BOOL create_fot( const WCHAR *resource, const WCHAR *font_file, const str
|
||||
BOOL WineEngCreateScalableFontResource( DWORD hidden, LPCWSTR resource,
|
||||
LPCWSTR font_file, LPCWSTR font_path )
|
||||
{
|
||||
@@ -81,7 +81,7 @@ index de40d9f..d4eb837 100644
|
||||
if (!unix_name || !get_fontdir( unix_name, &fontdir ))
|
||||
SetLastError( ERROR_INVALID_PARAMETER );
|
||||
else
|
||||
@@ -4012,8 +4021,6 @@ static BOOL init_freetype(void)
|
||||
@@ -4174,8 +4183,6 @@ static BOOL init_freetype(void)
|
||||
FT_SimpleVersion = ((FT_Version.major << 16) & 0xff0000) |
|
||||
((FT_Version.minor << 8) & 0x00ff00) |
|
||||
((FT_Version.patch ) & 0x0000ff);
|
||||
@@ -90,8 +90,8 @@ index de40d9f..d4eb837 100644
|
||||
return TRUE;
|
||||
|
||||
sym_not_found:
|
||||
@@ -4200,21 +4207,13 @@ static void reorder_font_list(void)
|
||||
set_default( default_sans_list );
|
||||
@@ -4361,21 +4368,13 @@ static void reorder_font_list(void)
|
||||
default_sans = set_default( default_sans_list );
|
||||
}
|
||||
|
||||
-/*************************************************************
|
||||
@@ -114,7 +114,7 @@ index de40d9f..d4eb837 100644
|
||||
|
||||
#ifdef SONAME_LIBFONTCONFIG
|
||||
init_fontconfig();
|
||||
@@ -4240,7 +4239,7 @@ BOOL WineEngInit(void)
|
||||
@@ -4401,7 +4400,7 @@ BOOL WineEngInit(void)
|
||||
if((font_mutex = CreateMutexW(NULL, FALSE, font_mutex_nameW)) == NULL)
|
||||
{
|
||||
ERR("Failed to create font mutex\n");
|
||||
@@ -123,7 +123,7 @@ index de40d9f..d4eb837 100644
|
||||
}
|
||||
WaitForSingleObject(font_mutex, INFINITE);
|
||||
|
||||
@@ -4267,6 +4266,21 @@ BOOL WineEngInit(void)
|
||||
@@ -4428,6 +4427,21 @@ BOOL WineEngInit(void)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -145,7 +145,7 @@ index de40d9f..d4eb837 100644
|
||||
/* Some fonts have large usWinDescent values, as a result of storing signed short
|
||||
in unsigned field. That's probably caused by sTypoDescent vs usWinDescent confusion in
|
||||
some font generation tools. */
|
||||
@@ -4948,8 +4962,12 @@ static BOOL select_charmap(FT_Face ft_face, FT_Encoding encoding)
|
||||
@@ -5124,8 +5138,12 @@ static BOOL select_charmap(FT_Face ft_face, FT_Encoding encoding)
|
||||
static BOOL freetype_CreateDC( PHYSDEV *dev, LPCWSTR driver, LPCWSTR device,
|
||||
LPCWSTR output, const DEVMODEW *devmode )
|
||||
{
|
||||
@@ -159,7 +159,7 @@ index de40d9f..d4eb837 100644
|
||||
if (!physdev) return FALSE;
|
||||
push_dc_driver( dev, &physdev->dev, &freetype_funcs );
|
||||
return TRUE;
|
||||
@@ -8218,6 +8236,7 @@ static BOOL freetype_FontIsLinked( PHYSDEV dev )
|
||||
@@ -8627,6 +8645,7 @@ static BOOL freetype_FontIsLinked( PHYSDEV dev )
|
||||
*/
|
||||
BOOL WINAPI GetRasterizerCaps( LPRASTERIZER_STATUS lprs, UINT cbNumBytes)
|
||||
{
|
||||
@@ -168,5 +168,5 @@ index de40d9f..d4eb837 100644
|
||||
lprs->wFlags = TT_AVAILABLE | TT_ENABLED;
|
||||
lprs->nLanguageID = 0;
|
||||
--
|
||||
2.5.1
|
||||
1.9.1
|
||||
|
||||
|
@@ -0,0 +1,34 @@
|
||||
From 117673ffe8bd5a8aae060307bcf6af83b4da011e Mon Sep 17 00:00:00 2001
|
||||
From: Gijs Vermeulen <gijsvrm@gmail.com>
|
||||
Date: Mon, 17 Dec 2018 11:49:26 +1100
|
||||
Subject: [PATCH] imm32: Only generate 'WM_IME_SETCONTEXT' message if window
|
||||
has focus
|
||||
|
||||
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=31157
|
||||
---
|
||||
dlls/imm32/imm.c | 9 ++++++---
|
||||
1 file changed, 6 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/imm32/imm.c b/dlls/imm32/imm.c
|
||||
index 28eb00f..4255e98 100644
|
||||
--- a/dlls/imm32/imm.c
|
||||
+++ b/dlls/imm32/imm.c
|
||||
@@ -608,9 +608,12 @@ HIMC WINAPI ImmAssociateContext(HWND hWnd, HIMC hIMC)
|
||||
if (!hIMC)
|
||||
return old;
|
||||
|
||||
- SendMessageW(data->IMC.hWnd, WM_IME_SETCONTEXT, FALSE, ISC_SHOWUIALL);
|
||||
- data->IMC.hWnd = hWnd;
|
||||
- SendMessageW(data->IMC.hWnd, WM_IME_SETCONTEXT, TRUE, ISC_SHOWUIALL);
|
||||
+ if(GetActiveWindow() == data->IMC.hWnd)
|
||||
+ {
|
||||
+ SendMessageW(data->IMC.hWnd, WM_IME_SETCONTEXT, FALSE, ISC_SHOWUIALL);
|
||||
+ data->IMC.hWnd = hWnd;
|
||||
+ SendMessageW(data->IMC.hWnd, WM_IME_SETCONTEXT, TRUE, ISC_SHOWUIALL);
|
||||
+ }
|
||||
|
||||
return old;
|
||||
}
|
||||
--
|
||||
1.9.1
|
||||
|
5
patches/imm32-message_on_focus/definition
Normal file
5
patches/imm32-message_on_focus/definition
Normal file
@@ -0,0 +1,5 @@
|
||||
# I suspect that bug #28861,#46263 are related to this issue as well.
|
||||
# Both of these hint that the szwWineIMCProperty doesn't the correct value
|
||||
# and thus goes down invalid path leading to a crash.
|
||||
#
|
||||
Fixes: [31157] imm32: Only generate 'WM_IME_SETCONTEXT' message if window has focus.
|
@@ -1,48 +0,0 @@
|
||||
From d246bb6bbadaa959d49a29dc28d1288473ca8375 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Wed, 17 May 2017 11:58:20 +0200
|
||||
Subject: urlmon/tests: Add test for opening cache file with DELETE access.
|
||||
|
||||
---
|
||||
dlls/urlmon/tests/url.c | 11 +++++++++++
|
||||
1 file changed, 11 insertions(+)
|
||||
|
||||
diff --git a/dlls/urlmon/tests/url.c b/dlls/urlmon/tests/url.c
|
||||
index cd1d855032d..70234ff3fd7 100644
|
||||
--- a/dlls/urlmon/tests/url.c
|
||||
+++ b/dlls/urlmon/tests/url.c
|
||||
@@ -182,6 +182,7 @@ static HRESULT abort_hres;
|
||||
static BOOL have_IHttpNegotiate2, use_bscex, is_async_prot;
|
||||
static BOOL test_redirect, use_cache_file, callback_read, no_callback, test_abort;
|
||||
static WCHAR cache_file_name[MAX_PATH];
|
||||
+static WCHAR http_cache_file[MAX_PATH];
|
||||
static BOOL only_check_prot_args = FALSE;
|
||||
static BOOL invalid_cn_accepted = FALSE;
|
||||
static BOOL abort_start = FALSE;
|
||||
@@ -1927,6 +1928,14 @@ static HRESULT WINAPI statusclb_OnStopBinding(IBindStatusCallbackEx *iface, HRES
|
||||
ok( WaitForSingleObject(complete_event2, 90000) == WAIT_OBJECT_0, "wait timed out\n" );
|
||||
}
|
||||
|
||||
+ if(test_protocol == HTTP_TEST && !emulate_protocol && http_cache_file[0]) {
|
||||
+ HANDLE file = CreateFileW(http_cache_file, DELETE, FILE_SHARE_DELETE, NULL,
|
||||
+ OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
+ ok(file == INVALID_HANDLE_VALUE, "expected INVALID_HANDLE_VALUE, got %p\n", file);
|
||||
+ ok(GetLastError() == ERROR_SHARING_VIOLATION, "expected ERROR_SHARING_VIOLATION, got %u\n", GetLastError());
|
||||
+ http_cache_file[0] = 0;
|
||||
+ }
|
||||
+
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -2083,6 +2092,8 @@ static HRESULT WINAPI statusclb_OnDataAvailable(IBindStatusCallbackEx *iface, DW
|
||||
else if(emulate_protocol)
|
||||
ok(!lstrcmpW(pstgmed->u.lpszFileName, cache_fileW),
|
||||
"unexpected file name %s\n", wine_dbgstr_w(pstgmed->u.lpszFileName));
|
||||
+ else if(test_protocol == HTTP_TEST)
|
||||
+ lstrcpyW(http_cache_file, pstgmed->u.lpszFileName);
|
||||
else
|
||||
ok(pstgmed->u.lpszFileName != NULL, "lpszFileName == NULL\n");
|
||||
}
|
||||
--
|
||||
2.12.2
|
||||
|
@@ -1,25 +0,0 @@
|
||||
From fcb6d21ede52ef770a04c59ea6bd5b9483c31f32 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Wed, 17 May 2017 12:03:15 +0200
|
||||
Subject: appwiz.cpl: Copy addons to cache instead of moving.
|
||||
|
||||
---
|
||||
dlls/appwiz.cpl/addons.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/appwiz.cpl/addons.c b/dlls/appwiz.cpl/addons.c
|
||||
index c3847b54948..91cd485b026 100644
|
||||
--- a/dlls/appwiz.cpl/addons.c
|
||||
+++ b/dlls/appwiz.cpl/addons.c
|
||||
@@ -510,7 +510,7 @@ static HRESULT WINAPI InstallCallback_OnStopBinding(IBindStatusCallback *iface,
|
||||
|
||||
cache_file_name = get_cache_file_name(TRUE);
|
||||
if(cache_file_name) {
|
||||
- MoveFileW(msi_file, cache_file_name);
|
||||
+ CopyFileW(msi_file, cache_file_name, FALSE);
|
||||
heap_free(cache_file_name);
|
||||
}
|
||||
}else {
|
||||
--
|
||||
2.12.2
|
||||
|
@@ -1 +0,0 @@
|
||||
Fixes: [14901] MoveFile with source == dest should succeed.
|
@@ -1,25 +0,0 @@
|
||||
From 8acd785888b9324994f0477d6d2f2bdcd3b91219 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sat, 27 Feb 2016 03:20:34 +0100
|
||||
Subject: krnl386.exe16: Do not reassign default handles after they got closed.
|
||||
|
||||
---
|
||||
dlls/krnl386.exe16/file.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/krnl386.exe16/file.c b/dlls/krnl386.exe16/file.c
|
||||
index b66b753..9b720ef 100644
|
||||
--- a/dlls/krnl386.exe16/file.c
|
||||
+++ b/dlls/krnl386.exe16/file.c
|
||||
@@ -363,7 +363,7 @@ HFILE16 WINAPI _lclose16( HFILE16 hFile )
|
||||
}
|
||||
TRACE("%d (handle32=%p)\n", hFile, dos_handles[hFile] );
|
||||
CloseHandle( dos_handles[hFile] );
|
||||
- dos_handles[hFile] = 0;
|
||||
+ dos_handles[hFile] = (hFile < 5) ? INVALID_HANDLE_VALUE : 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
--
|
||||
2.7.1
|
||||
|
@@ -1 +0,0 @@
|
||||
Fixes: [19184] Do not reassign default handles after they got closed
|
@@ -0,0 +1,240 @@
|
||||
From a6148704ad3c09339872975b1f129c37c3d35aa3 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Thu, 20 Dec 2018 13:54:47 +1100
|
||||
Subject: [PATCH] mf: Implement MFCreateSequencerSource
|
||||
|
||||
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46105
|
||||
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
---
|
||||
dlls/mf/main.c | 140 ++++++++++++++++++++++++++++++++++++++++++++++
|
||||
dlls/mf/mf.spec | 2 +-
|
||||
dlls/mf/tests/Makefile.in | 2 +-
|
||||
dlls/mf/tests/mf.c | 18 ++++++
|
||||
include/mfidl.idl | 1 +
|
||||
5 files changed, 161 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/mf/main.c b/dlls/mf/main.c
|
||||
index 73cd6aa..1ef13b5 100644
|
||||
--- a/dlls/mf/main.c
|
||||
+++ b/dlls/mf/main.c
|
||||
@@ -74,3 +74,143 @@ HRESULT WINAPI MFGetService(IUnknown *object, REFGUID service, REFIID riid, void
|
||||
IMFGetService_Release(gs);
|
||||
return hr;
|
||||
}
|
||||
+
|
||||
+typedef struct seqsource
|
||||
+{
|
||||
+ IMFSequencerSource IMFSequencerSource_iface;
|
||||
+ LONG ref;
|
||||
+} seqsource;
|
||||
+
|
||||
+static inline seqsource *impl_from_IMFSequencerSource(IMFSequencerSource *iface)
|
||||
+{
|
||||
+ return CONTAINING_RECORD(iface, seqsource, IMFSequencerSource_iface);
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI seqsource_QueryInterface(IMFSequencerSource *iface, REFIID riid, void **out)
|
||||
+{
|
||||
+ seqsource *This = impl_from_IMFSequencerSource(iface);
|
||||
+
|
||||
+ TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), out);
|
||||
+
|
||||
+ if ( IsEqualIID(riid, &IID_IMFSequencerSource) ||
|
||||
+ IsEqualIID(riid, &IID_IUnknown))
|
||||
+ {
|
||||
+ *out = &This->IMFSequencerSource_iface;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ FIXME("(%s, %p)\n", debugstr_guid(riid), out);
|
||||
+ *out = NULL;
|
||||
+ return E_NOINTERFACE;
|
||||
+ }
|
||||
+
|
||||
+ IUnknown_AddRef((IUnknown*)*out);
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI seqsource_AddRef(IMFSequencerSource *iface)
|
||||
+{
|
||||
+ seqsource *This = impl_from_IMFSequencerSource(iface);
|
||||
+ ULONG ref = InterlockedIncrement(&This->ref);
|
||||
+
|
||||
+ TRACE("(%p) ref=%u\n", This, ref);
|
||||
+
|
||||
+ return ref;
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI seqsource_Release(IMFSequencerSource *iface)
|
||||
+{
|
||||
+ seqsource *This = impl_from_IMFSequencerSource(iface);
|
||||
+ ULONG ref = InterlockedDecrement(&This->ref);
|
||||
+
|
||||
+ TRACE("(%p) ref=%u\n", This, ref);
|
||||
+
|
||||
+ if (!ref)
|
||||
+ {
|
||||
+ HeapFree(GetProcessHeap(), 0, This);
|
||||
+ }
|
||||
+
|
||||
+ return ref;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI seqsource_AppendTopology(IMFSequencerSource *iface, IMFTopology *topology, DWORD flags, MFSequencerElementId *element)
|
||||
+{
|
||||
+ seqsource *This = impl_from_IMFSequencerSource(iface);
|
||||
+
|
||||
+ FIXME("%p, %p, %x, %p\n", This, topology, flags, element);
|
||||
+
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI seqsource_DeleteTopology(IMFSequencerSource *iface, MFSequencerElementId element)
|
||||
+{
|
||||
+ seqsource *This = impl_from_IMFSequencerSource(iface);
|
||||
+
|
||||
+ FIXME("%p, %d\n", This, element);
|
||||
+
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI seqsource_GetPresentationContext(IMFSequencerSource *iface, IMFPresentationDescriptor *pd, MFSequencerElementId *id,
|
||||
+ IMFTopology **topology)
|
||||
+{
|
||||
+ seqsource *This = impl_from_IMFSequencerSource(iface);
|
||||
+
|
||||
+ FIXME("%p, %p, %p, %p\n", This, pd, id, topology);
|
||||
+
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI seqsource_UpdateTopology(IMFSequencerSource *iface, MFSequencerElementId id, IMFTopology *topology)
|
||||
+{
|
||||
+ seqsource *This = impl_from_IMFSequencerSource(iface);
|
||||
+
|
||||
+ FIXME("%p, %d, %p\n", This, id, topology);
|
||||
+
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI seqsource_UpdateTopologyFlags(IMFSequencerSource *iface, MFSequencerElementId id, DWORD flags)
|
||||
+{
|
||||
+ seqsource *This = impl_from_IMFSequencerSource(iface);
|
||||
+
|
||||
+ FIXME("%p, %d, %x\n", This, id, flags);
|
||||
+
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static const IMFSequencerSourceVtbl seqsrc_vtbl =
|
||||
+{
|
||||
+ seqsource_QueryInterface,
|
||||
+ seqsource_AddRef,
|
||||
+ seqsource_Release,
|
||||
+ seqsource_AppendTopology,
|
||||
+ seqsource_DeleteTopology,
|
||||
+ seqsource_GetPresentationContext,
|
||||
+ seqsource_UpdateTopology,
|
||||
+ seqsource_UpdateTopologyFlags
|
||||
+};
|
||||
+
|
||||
+/***********************************************************************
|
||||
+ * MFCreateSequencerSource (mf.@)
|
||||
+ */
|
||||
+HRESULT WINAPI MFCreateSequencerSource(IUnknown *reserved, IMFSequencerSource **sequencer)
|
||||
+{
|
||||
+ seqsource *object;
|
||||
+
|
||||
+ TRACE("(%p, %p)\n", reserved, sequencer);
|
||||
+
|
||||
+ if (!sequencer)
|
||||
+ return E_POINTER;
|
||||
+
|
||||
+ object = HeapAlloc(GetProcessHeap(), 0, sizeof(*object));
|
||||
+ if (!object)
|
||||
+ return E_OUTOFMEMORY;
|
||||
+
|
||||
+ object->IMFSequencerSource_iface.lpVtbl = &seqsrc_vtbl;
|
||||
+ object->ref = 1;
|
||||
+
|
||||
+ *sequencer = &object->IMFSequencerSource_iface;
|
||||
+
|
||||
+ return S_OK;
|
||||
+}
|
||||
diff --git a/dlls/mf/mf.spec b/dlls/mf/mf.spec
|
||||
index deb9057..b46c905 100644
|
||||
--- a/dlls/mf/mf.spec
|
||||
+++ b/dlls/mf/mf.spec
|
||||
@@ -54,7 +54,7 @@
|
||||
@ stub MFCreateSampleGrabberSinkActivate
|
||||
@ stub MFCreateSecureHttpSchemePlugin
|
||||
@ stub MFCreateSequencerSegmentOffset
|
||||
-@ stub MFCreateSequencerSource
|
||||
+@ stdcall MFCreateSequencerSource(ptr ptr)
|
||||
@ stub MFCreateSequencerSourceRemoteStream
|
||||
@ stub MFCreateSimpleTypeHandler
|
||||
@ stdcall MFCreateSourceResolver(ptr) mfplat.MFCreateSourceResolver
|
||||
diff --git a/dlls/mf/tests/Makefile.in b/dlls/mf/tests/Makefile.in
|
||||
index f989baa..f233cff 100644
|
||||
--- a/dlls/mf/tests/Makefile.in
|
||||
+++ b/dlls/mf/tests/Makefile.in
|
||||
@@ -1,5 +1,5 @@
|
||||
TESTDLL = mf.dll
|
||||
-IMPORTS = mf
|
||||
+IMPORTS = mf mfplat
|
||||
|
||||
C_SRCS = \
|
||||
mf.c
|
||||
diff --git a/dlls/mf/tests/mf.c b/dlls/mf/tests/mf.c
|
||||
index 76e092a..ca10233 100644
|
||||
--- a/dlls/mf/tests/mf.c
|
||||
+++ b/dlls/mf/tests/mf.c
|
||||
@@ -28,6 +28,7 @@
|
||||
|
||||
#include "initguid.h"
|
||||
#include "mfidl.h"
|
||||
+#include "mfapi.h"
|
||||
|
||||
#include "wine/test.h"
|
||||
|
||||
@@ -170,8 +171,25 @@ static void test_MFGetService(void)
|
||||
ok(unk == (void *)0xdeadbeef, "Unexpected out object.\n");
|
||||
}
|
||||
|
||||
+static void test_MFCreateSequencerSource(void)
|
||||
+{
|
||||
+ HRESULT hr;
|
||||
+ IMFSequencerSource *seq;
|
||||
+
|
||||
+ hr = MFStartup(MF_VERSION, MFSTARTUP_FULL);
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+
|
||||
+ hr = MFCreateSequencerSource(NULL, &seq);
|
||||
+ ok(hr == S_OK, "got %#x\n", hr);
|
||||
+
|
||||
+ IMFSequencerSource_Release(seq);
|
||||
+
|
||||
+ MFShutdown();
|
||||
+}
|
||||
+
|
||||
START_TEST(mf)
|
||||
{
|
||||
test_topology();
|
||||
test_MFGetService();
|
||||
+ test_MFCreateSequencerSource();
|
||||
}
|
||||
diff --git a/include/mfidl.idl b/include/mfidl.idl
|
||||
index 2373e41..39dc394 100644
|
||||
--- a/include/mfidl.idl
|
||||
+++ b/include/mfidl.idl
|
||||
@@ -307,6 +307,7 @@ interface IMFSequencerSource : IUnknown
|
||||
|
||||
cpp_quote("HRESULT WINAPI MFCreateMediaSession(IMFAttributes *config, IMFMediaSession **session);")
|
||||
cpp_quote("HRESULT WINAPI MFCreateMFByteStreamOnStream(IStream *stream, IMFByteStream **bytestream);" )
|
||||
+cpp_quote("HRESULT WINAPI MFCreateSequencerSource(IUnknown *reserved, IMFSequencerSource **sequencer);" )
|
||||
cpp_quote("HRESULT WINAPI MFCreateSourceResolver(IMFSourceResolver **resolver);")
|
||||
cpp_quote("HRESULT WINAPI MFCreateStreamDescriptor(DWORD identifier, DWORD cMediaTypes,")
|
||||
cpp_quote(" IMFMediaType **types, IMFStreamDescriptor **descriptor);")
|
||||
--
|
||||
1.9.1
|
||||
|
1
patches/mf-MFCreateSequencerSource/definition
Normal file
1
patches/mf-MFCreateSequencerSource/definition
Normal file
@@ -0,0 +1 @@
|
||||
Fixes: [46105] mf: Implement MFCreateSequencerSource
|
@@ -0,0 +1,69 @@
|
||||
From 544deb6c0d9ae04d3b82d241f7ffe6a21fa3835f Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Mon, 17 Dec 2018 11:21:48 +1100
|
||||
Subject: [PATCH] mfplat: Implement MFGetSystemTime
|
||||
|
||||
Wine-bug: https://bugs.winehq.org/show_bug.cgi?id=46300
|
||||
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
---
|
||||
dlls/mfplat/main.c | 17 +++++++++++++++++
|
||||
dlls/mfplat/mfplat.spec | 2 +-
|
||||
include/mfidl.idl | 1 +
|
||||
3 files changed, 19 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/mfplat/main.c b/dlls/mfplat/main.c
|
||||
index c7c3465..1e8e2ea 100644
|
||||
--- a/dlls/mfplat/main.c
|
||||
+++ b/dlls/mfplat/main.c
|
||||
@@ -248,6 +248,23 @@ HRESULT WINAPI MFTUnregisterLocal(IClassFactory *factory)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
+MFTIME WINAPI MFGetSystemTime()
|
||||
+{
|
||||
+ SYSTEMTIME st;
|
||||
+ FILETIME ft;
|
||||
+ MFTIME mf;
|
||||
+
|
||||
+ TRACE("()\n");
|
||||
+
|
||||
+ GetSystemTime(&st);
|
||||
+
|
||||
+ SystemTimeToFileTime(&st, &ft);
|
||||
+
|
||||
+ memcpy(&mf, &ft, sizeof(FILETIME));
|
||||
+
|
||||
+ return mf;
|
||||
+}
|
||||
+
|
||||
static BOOL match_type(const WCHAR *clsid_str, const WCHAR *type_str, MFT_REGISTER_TYPE_INFO *type)
|
||||
{
|
||||
HKEY htransform, hfilter;
|
||||
diff --git a/dlls/mfplat/mfplat.spec b/dlls/mfplat/mfplat.spec
|
||||
index c828aea..349b926 100644
|
||||
--- a/dlls/mfplat/mfplat.spec
|
||||
+++ b/dlls/mfplat/mfplat.spec
|
||||
@@ -98,7 +98,7 @@
|
||||
@ stub MFGetPrivateWorkqueues
|
||||
@ stub MFGetSockaddrFromNumericName
|
||||
@ stub MFGetStrideForBitmapInfoHeader
|
||||
-@ stub MFGetSystemTime
|
||||
+@ stdcall MFGetSystemTime()
|
||||
@ stub MFGetTimerPeriodicity
|
||||
@ stub MFGetUncompressedVideoFormat
|
||||
@ stub MFGetWorkQueueMMCSSClass
|
||||
diff --git a/include/mfidl.idl b/include/mfidl.idl
|
||||
index 2373e41..2fdb288 100644
|
||||
--- a/include/mfidl.idl
|
||||
+++ b/include/mfidl.idl
|
||||
@@ -313,6 +313,7 @@ cpp_quote(" IMFMediaType **types, IMFStreamDescriptor **descriptor);")
|
||||
cpp_quote("HRESULT WINAPI MFCreateTopology(IMFTopology **topology);")
|
||||
cpp_quote("HRESULT WINAPI MFGetSupportedMimeTypes(PROPVARIANT *array);")
|
||||
cpp_quote("HRESULT WINAPI MFGetService(IUnknown *object, REFGUID service, REFIID iid, void **obj);")
|
||||
+cpp_quote("MFTIME WINAPI MFGetSystemTime(void);")
|
||||
|
||||
[
|
||||
object,
|
||||
--
|
||||
1.9.1
|
||||
|
1
patches/mfplat-MFGetSystemTime/definition
Normal file
1
patches/mfplat-MFGetSystemTime/definition
Normal file
@@ -0,0 +1 @@
|
||||
Fixes: [46300] mfplat: Implement MFGetSystemTime
|
@@ -0,0 +1,128 @@
|
||||
From 9148a362cb4a728762584e1daf47d8c09c24d9ba Mon Sep 17 00:00:00 2001
|
||||
From: Gijs Vermeulen <gijsvrm@gmail.com>
|
||||
Date: Mon, 14 Jan 2019 18:07:35 +0100
|
||||
Subject: [PATCH] msvcp140: Export _Equivalent and port tests.
|
||||
|
||||
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46465
|
||||
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
|
||||
---
|
||||
dlls/msvcp140/msvcp140.spec | 2 +-
|
||||
dlls/msvcp140/tests/msvcp140.c | 69 ++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 70 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/msvcp140/msvcp140.spec b/dlls/msvcp140/msvcp140.spec
|
||||
index 245389e61e..6a4eb14c04 100644
|
||||
--- a/dlls/msvcp140/msvcp140.spec
|
||||
+++ b/dlls/msvcp140/msvcp140.spec
|
||||
@@ -3638,7 +3638,7 @@
|
||||
@ cdecl _Current_set(wstr) tr2_sys__Current_set_wchar
|
||||
@ extern _Denorm _Denorm
|
||||
@ cdecl _Dtest(ptr) _Dtest
|
||||
-@ stub _Equivalent
|
||||
+@ cdecl _Equivalent(wstr wstr) tr2_sys__Equivalent_wchar
|
||||
@ cdecl _Exp(ptr double long) _Exp
|
||||
@ stub _FCosh
|
||||
@ extern _FDenorm _FDenorm
|
||||
diff --git a/dlls/msvcp140/tests/msvcp140.c b/dlls/msvcp140/tests/msvcp140.c
|
||||
index 5705882c88..2ba809dc50 100644
|
||||
--- a/dlls/msvcp140/tests/msvcp140.c
|
||||
+++ b/dlls/msvcp140/tests/msvcp140.c
|
||||
@@ -176,6 +176,7 @@ static void (__cdecl *p__Release_chore)(_Threadpool_chore*);
|
||||
static void (__cdecl *p_Close_dir)(void*);
|
||||
static MSVCP_bool (__cdecl *p_Current_get)(WCHAR *);
|
||||
static MSVCP_bool (__cdecl *p_Current_set)(WCHAR const *);
|
||||
+static int (__cdecl *p_Equivalent)(WCHAR const*, WCHAR const*);
|
||||
static ULONGLONG (__cdecl *p_File_size)(WCHAR const *);
|
||||
static __int64 (__cdecl *p_Last_write_time)(WCHAR const*);
|
||||
static void (__cdecl *p_Set_last_write_time)(WCHAR const*, __int64);
|
||||
@@ -267,6 +268,7 @@ static BOOL init(void)
|
||||
SET(p_Close_dir, "_Close_dir");
|
||||
SET(p_Current_get, "_Current_get");
|
||||
SET(p_Current_set, "_Current_set");
|
||||
+ SET(p_Equivalent, "_Equivalent");
|
||||
SET(p_File_size, "_File_size");
|
||||
SET(p_Last_write_time, "_Last_write_time");
|
||||
SET(p_Set_last_write_time, "_Set_last_write_time");
|
||||
@@ -1360,6 +1362,72 @@ static void test__Winerror_map(void)
|
||||
}
|
||||
}
|
||||
|
||||
+static void test_Equivalent(void)
|
||||
+{
|
||||
+ int val, i;
|
||||
+ HANDLE file;
|
||||
+ WCHAR temp_path[MAX_PATH], current_path[MAX_PATH];
|
||||
+ static const WCHAR wine_test_dirW[] =
|
||||
+ {'w','i','n','e','_','t','e','s','t','_','d','i','r',0};
|
||||
+ static const WCHAR f1W[] =
|
||||
+ {'w','i','n','e','_','t','e','s','t','_','d','i','r','/','f','1',0};
|
||||
+ static const WCHAR f1W_backslash[] =
|
||||
+ {'w','i','n','e','_','t','e','s','t','_','d','i','r','\\','f','1',0};
|
||||
+ static const WCHAR f1W_subdir[] =
|
||||
+ {'w','i','n','e','_','t','e','s','t','_','d','i','r','/','.','/','f','1',0};
|
||||
+ static const WCHAR f1W_long[] =
|
||||
+ {'w','i','n','e','_','t','e','s','t','_','d','i','r','/','.','.','/','w','i','n','e','_','t','e','s','t','_','d','i','r','/','f','1',0};
|
||||
+ static const WCHAR f2W[] =
|
||||
+ {'w','i','n','e','_','t','e','s','t','_','d','i','r','/','f','2',0};
|
||||
+ static const WCHAR not_existW[] =
|
||||
+ {'n','o','t','_','e','x','i','s','t','s','_','f','i','l','e',0};
|
||||
+ static const struct {
|
||||
+ const WCHAR *path1;
|
||||
+ const WCHAR *path2;
|
||||
+ int equivalent;
|
||||
+ } tests[] = {
|
||||
+ { NULL, NULL, -1 },
|
||||
+ { NULL, f1W, 0 },
|
||||
+ { f1W, NULL, 0 },
|
||||
+ { f1W, wine_test_dirW, 0 },
|
||||
+ { wine_test_dirW, f1W, 0 },
|
||||
+ { wine_test_dirW, wine_test_dirW, -1 },
|
||||
+ { f1W_subdir, f2W, 0 },
|
||||
+ { f1W, f1W, 1 },
|
||||
+ { not_existW, f1W, 0 },
|
||||
+ { f1W_backslash, f1W_subdir, 1 },
|
||||
+ { not_existW, not_existW, -1 },
|
||||
+ { f1W, not_existW, 0 },
|
||||
+ { f1W_long, f1W, 1 }
|
||||
+ };
|
||||
+
|
||||
+ memset(current_path, 0, MAX_PATH);
|
||||
+ GetCurrentDirectoryW(MAX_PATH, current_path);
|
||||
+ memset(temp_path, 0, MAX_PATH);
|
||||
+ GetTempPathW(MAX_PATH, temp_path);
|
||||
+ ok(SetCurrentDirectoryW(temp_path), "SetCurrentDirectoryW to temp_path failed\n");
|
||||
+ CreateDirectoryW(wine_test_dirW, NULL);
|
||||
+
|
||||
+ file = CreateFileW(f1W, 0, 0, NULL, CREATE_ALWAYS, 0, NULL);
|
||||
+ ok(file != INVALID_HANDLE_VALUE, "create file failed: INVALID_HANDLE_VALUE\n");
|
||||
+ CloseHandle(file);
|
||||
+ file = CreateFileW(f2W, 0, 0, NULL, CREATE_ALWAYS, 0, NULL);
|
||||
+ ok(file != INVALID_HANDLE_VALUE, "create file failed: INVALID_HANDLE_VALUE\n");
|
||||
+ CloseHandle(file);
|
||||
+
|
||||
+ for(i=0; i<ARRAY_SIZE(tests); i++) {
|
||||
+ errno = 0xdeadbeef;
|
||||
+ val = p_Equivalent(tests[i].path1, tests[i].path2);
|
||||
+ ok(tests[i].equivalent == val, "_Equivalent(): test %d expect: %d, got %d\n", i+1, tests[i].equivalent, val);
|
||||
+ ok(errno == 0xdeadbeef, "errno = %d\n", errno);
|
||||
+ }
|
||||
+
|
||||
+ ok(DeleteFileW(f1W), "expect wine_test_dir/f1 to exist\n");
|
||||
+ ok(DeleteFileW(f2W), "expect wine_test_dir/f2 to exist\n");
|
||||
+ ok(p_Remove_dir(wine_test_dirW), "expect wine_test_dir to exist\n");
|
||||
+ ok(SetCurrentDirectoryW(current_path), "SetCurrentDirectoryW failed\n");
|
||||
+}
|
||||
+
|
||||
START_TEST(msvcp140)
|
||||
{
|
||||
if(!init()) return;
|
||||
@@ -1383,5 +1451,6 @@ START_TEST(msvcp140)
|
||||
test_Last_write_time();
|
||||
test__Winerror_message();
|
||||
test__Winerror_map();
|
||||
+ test_Equivalent();
|
||||
FreeLibrary(msvcp);
|
||||
}
|
||||
--
|
||||
2.20.1
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user