mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
Rebase against 71d41b37a1917cdf20cdb171dc73c20dbfdaeefa.
This commit is contained in:
parent
3d3cbfce86
commit
7b199110bb
@ -1,183 +0,0 @@
|
||||
From 3cf6891f84548a9519bed5db83ad19e801ad8d22 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Gofman <gofmanp@gmail.com>
|
||||
Date: Thu, 4 Apr 2019 02:25:00 +0300
|
||||
Subject: [PATCH] ddraw: Allow setting texture without DDSCAPS_TEXTURE for
|
||||
software device.
|
||||
|
||||
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
|
||||
---
|
||||
dlls/ddraw/device.c | 20 ++++++--
|
||||
dlls/ddraw/tests/ddraw4.c | 102 ++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 118 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c
|
||||
index c99eafc7524..49aae2feef5 100644
|
||||
--- a/dlls/ddraw/device.c
|
||||
+++ b/dlls/ddraw/device.c
|
||||
@@ -4822,7 +4822,8 @@ static HRESULT d3d_device7_SetTexture(IDirect3DDevice7 *iface,
|
||||
struct ddraw_surface *surf = unsafe_impl_from_IDirectDrawSurface7(texture);
|
||||
struct wined3d_texture *wined3d_texture = NULL;
|
||||
|
||||
- TRACE("iface %p, stage %u, texture %p.\n", iface, stage, texture);
|
||||
+ TRACE("iface %p, stage %u, texture %p, surf %p, surf->surface_desc.ddsCaps.dwCaps %#x.\n",
|
||||
+ iface, stage, texture, surf, surf ? surf->surface_desc.ddsCaps.dwCaps : 0);
|
||||
|
||||
if (surf && (surf->surface_desc.ddsCaps.dwCaps & DDSCAPS_TEXTURE))
|
||||
wined3d_texture = surf->draw_texture ? surf->draw_texture : surf->wined3d_texture;
|
||||
@@ -4858,19 +4859,30 @@ static HRESULT WINAPI d3d_device3_SetTexture(IDirect3DDevice3 *iface,
|
||||
{
|
||||
struct d3d_device *device = impl_from_IDirect3DDevice3(iface);
|
||||
struct ddraw_surface *tex = unsafe_impl_from_IDirect3DTexture2(texture);
|
||||
- HRESULT hr;
|
||||
+ struct wined3d_texture *wined3d_texture;
|
||||
|
||||
TRACE("iface %p, stage %u, texture %p.\n", iface, stage, texture);
|
||||
|
||||
wined3d_mutex_lock();
|
||||
|
||||
- hr = IDirect3DDevice7_SetTexture(&device->IDirect3DDevice7_iface, stage, &tex->IDirectDrawSurface7_iface);
|
||||
+ if (tex && ((tex->surface_desc.ddsCaps.dwCaps & DDSCAPS_TEXTURE) || !device->hardware_device))
|
||||
+ {
|
||||
+ if (!(tex->surface_desc.ddsCaps.dwCaps & DDSCAPS_TEXTURE))
|
||||
+ WARN("Setting texture without DDSCAPS_TEXTURE.\n");
|
||||
+ wined3d_texture = tex->wined3d_texture;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ wined3d_texture = NULL;
|
||||
+ }
|
||||
+
|
||||
+ wined3d_stateblock_set_texture(device->state, stage, wined3d_texture);
|
||||
|
||||
fixup_texture_alpha_op(device);
|
||||
|
||||
wined3d_mutex_unlock();
|
||||
|
||||
- return hr;
|
||||
+ return D3D_OK;
|
||||
}
|
||||
|
||||
static const struct tss_lookup
|
||||
diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c
|
||||
index 5af824c3f78..032ae01fbf8 100644
|
||||
--- a/dlls/ddraw/tests/ddraw4.c
|
||||
+++ b/dlls/ddraw/tests/ddraw4.c
|
||||
@@ -18326,6 +18326,107 @@ static void run_for_each_device_type(void (*test_func)(const GUID *))
|
||||
test_func(&IID_IDirect3DRGBDevice);
|
||||
}
|
||||
|
||||
+static void test_texture_wrong_caps(const GUID *device_guid)
|
||||
+{
|
||||
+ static struct
|
||||
+ {
|
||||
+ struct vec3 position;
|
||||
+ struct vec2 texcoord;
|
||||
+ }
|
||||
+ quad[] =
|
||||
+ {
|
||||
+ {{-1.0f, -1.0f, 0.0f}, {0.0f, 1.0f}},
|
||||
+ {{-1.0f, 1.0f, 0.0f}, {0.0f, 0.0f}},
|
||||
+ {{ 1.0f, -1.0f, 0.0f}, {1.0f, 1.0f}},
|
||||
+ {{ 1.0f, 1.0f, 0.0f}, {1.0f, 0.0f}},
|
||||
+ };
|
||||
+ static DDPIXELFORMAT fmt =
|
||||
+ {
|
||||
+ sizeof(DDPIXELFORMAT), DDPF_RGB | DDPF_ALPHAPIXELS, 0,
|
||||
+ {32}, {0x00ff0000}, {0x0000ff00}, {0x000000ff}, {0xff000000}
|
||||
+ };
|
||||
+ D3DRECT clear_rect = {{0}, {0}, {640}, {480}};
|
||||
+ IDirectDrawSurface4 *surface, *rt;
|
||||
+ D3DCOLOR color, expected_color;
|
||||
+ IDirect3DViewport3 *viewport;
|
||||
+ IDirect3DTexture2 *texture;
|
||||
+ IDirect3DDevice3 *device;
|
||||
+ IDirectDraw4 *ddraw;
|
||||
+ DDSURFACEDESC2 ddsd;
|
||||
+ IDirect3D3 *d3d;
|
||||
+ ULONG refcount;
|
||||
+ HWND window;
|
||||
+ HRESULT hr;
|
||||
+
|
||||
+ window = create_window();
|
||||
+ if (!(device = create_device_ex(window, DDSCL_NORMAL, device_guid)))
|
||||
+ {
|
||||
+ skip("Failed to create a 3D device, skipping test.\n");
|
||||
+ DestroyWindow(window);
|
||||
+ return;
|
||||
+ }
|
||||
+ hr = IDirect3DDevice3_GetDirect3D(device, &d3d);
|
||||
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
|
||||
+ hr = IDirect3D3_QueryInterface(d3d, &IID_IDirectDraw4, (void **)&ddraw);
|
||||
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
|
||||
+ hr = IDirect3DDevice3_GetRenderTarget(device, &rt);
|
||||
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
|
||||
+
|
||||
+ viewport = create_viewport(device, 0, 0, 640, 480);
|
||||
+ hr = IDirect3DDevice3_SetCurrentViewport(device, viewport);
|
||||
+ ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
|
||||
+
|
||||
+ memset(&ddsd, 0, sizeof(ddsd));
|
||||
+ ddsd.dwSize = sizeof(ddsd);
|
||||
+ ddsd.dwFlags = DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH | DDSD_PIXELFORMAT;
|
||||
+ ddsd.dwHeight = 16;
|
||||
+ ddsd.dwWidth = 16;
|
||||
+ ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN;
|
||||
+ U4(ddsd).ddpfPixelFormat = fmt;
|
||||
+ hr = IDirectDraw4_CreateSurface(ddraw, &ddsd, &surface, NULL);
|
||||
+ ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
|
||||
+ hr = IDirectDrawSurface4_QueryInterface(surface, &IID_IDirect3DTexture2, (void **)&texture);
|
||||
+ ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
|
||||
+
|
||||
+ fill_surface(surface, 0xff00ff00);
|
||||
+
|
||||
+ hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_ZENABLE, D3DZB_FALSE);
|
||||
+ ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
|
||||
+
|
||||
+ hr = IDirect3DDevice3_SetTextureStageState(device, 0, D3DTSS_COLOROP, D3DTOP_SELECTARG1);
|
||||
+ ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
|
||||
+ hr = IDirect3DDevice3_SetTextureStageState(device, 0, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1);
|
||||
+ ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
|
||||
+ hr = IDirect3DDevice3_SetTextureStageState(device, 0, D3DTSS_COLORARG1, D3DTA_TEXTURE);
|
||||
+ ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
|
||||
+ hr = IDirect3DDevice3_SetTextureStageState(device, 0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE);
|
||||
+
|
||||
+ ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
|
||||
+ hr = IDirect3DDevice3_SetTexture(device, 0, texture);
|
||||
+ ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
|
||||
+ hr = IDirect3DViewport3_Clear2(viewport, 1, &clear_rect, D3DCLEAR_TARGET, 0x000000ff, 0.0f, 0);
|
||||
+ ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
|
||||
+ hr = IDirect3DDevice3_BeginScene(device);
|
||||
+ ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
|
||||
+ hr = IDirect3DDevice3_DrawPrimitive(device, D3DPT_TRIANGLESTRIP,
|
||||
+ D3DFVF_XYZ | D3DFVF_TEX1, quad, 4, 0);
|
||||
+ ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
|
||||
+ hr = IDirect3DDevice3_EndScene(device);
|
||||
+ ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
|
||||
+
|
||||
+ expected_color = is_software_device_type(device_guid) ? 0x0000ff00 : 0x00ffffff;
|
||||
+ color = get_surface_color(rt, 320, 240);
|
||||
+ ok(color == expected_color, "Got color 0x%08x, expected 0x%08x.\n", color, expected_color);
|
||||
+
|
||||
+ IDirect3DTexture2_Release(texture);
|
||||
+ IDirectDrawSurface4_Release(surface);
|
||||
+ IDirectDraw4_Release(ddraw);
|
||||
+ IDirect3D3_Release(d3d);
|
||||
+ refcount = IDirect3DDevice3_Release(device);
|
||||
+ ok(!refcount, "Device has %u references left.\n", refcount);
|
||||
+ DestroyWindow(window);
|
||||
+}
|
||||
+
|
||||
START_TEST(ddraw4)
|
||||
{
|
||||
DDDEVICEIDENTIFIER identifier;
|
||||
@@ -18458,6 +18559,7 @@ START_TEST(ddraw4)
|
||||
test_gdi_surface();
|
||||
test_alphatest();
|
||||
test_clipper_refcount();
|
||||
+ run_for_each_device_type(test_texture_wrong_caps);
|
||||
test_caps();
|
||||
test_d32_support();
|
||||
test_surface_format_conversion_alpha();
|
||||
--
|
||||
2.20.1
|
||||
|
@ -1 +0,0 @@
|
||||
Fixes: [46948] Allow setting texture without DDSCAPS_TEXTURE for software device
|
@ -1,4 +1,4 @@
|
||||
From 6f06e976d6775538cf323f04951d4c46ff599d98 Mon Sep 17 00:00:00 2001
|
||||
From 65673c61b09de27189b5f319073e6807d8dbed9e Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Mon, 2 Nov 2020 20:24:07 -0600
|
||||
Subject: [PATCH] ntdll: Reimplement Win32 futexes on top of thread-ID alerts.
|
||||
@ -14,10 +14,10 @@ Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
|
||||
6 files changed, 187 insertions(+), 173 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h
|
||||
index 29566c22f17..39bb0c1ff6f 100644
|
||||
index b8f9dc28e63..eab3b5e5248 100644
|
||||
--- a/dlls/ntdll/ntdll_misc.h
|
||||
+++ b/dlls/ntdll/ntdll_misc.h
|
||||
@@ -86,6 +86,8 @@ extern const struct unix_funcs *unix_funcs DECLSPEC_HIDDEN;
|
||||
@@ -85,6 +85,8 @@ extern const struct unix_funcs *unix_funcs DECLSPEC_HIDDEN;
|
||||
|
||||
extern struct _KUSER_SHARED_DATA *user_shared_data DECLSPEC_HIDDEN;
|
||||
|
||||
@ -261,10 +261,10 @@ index 25496609f08..4f395336428 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c
|
||||
index af04c1b2057..10de9ce307a 100644
|
||||
index 438ff474a92..a962eb46ead 100644
|
||||
--- a/dlls/ntdll/unix/loader.c
|
||||
+++ b/dlls/ntdll/unix/loader.c
|
||||
@@ -1552,9 +1552,6 @@ static struct unix_funcs unix_funcs =
|
||||
@@ -1757,9 +1757,6 @@ static struct unix_funcs unix_funcs =
|
||||
#endif
|
||||
DbgUiIssueRemoteBreakin,
|
||||
RtlGetSystemTimePrecise,
|
||||
@ -275,10 +275,10 @@ index af04c1b2057..10de9ce307a 100644
|
||||
fast_RtlpUnWaitCriticalSection,
|
||||
fast_RtlDeleteCriticalSection,
|
||||
diff --git a/dlls/ntdll/unix/sync.c b/dlls/ntdll/unix/sync.c
|
||||
index 0fee8f3099d..d68dfbbf6af 100644
|
||||
index 7d6423083e1..41005425a90 100644
|
||||
--- a/dlls/ntdll/unix/sync.c
|
||||
+++ b/dlls/ntdll/unix/sync.c
|
||||
@@ -78,10 +78,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(sync);
|
||||
@@ -77,10 +77,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(sync);
|
||||
|
||||
HANDLE keyed_event = 0;
|
||||
|
||||
@ -289,7 +289,7 @@ index 0fee8f3099d..d68dfbbf6af 100644
|
||||
static const char *debugstr_timeout( const LARGE_INTEGER *timeout )
|
||||
{
|
||||
if (!timeout) return "(infinite)";
|
||||
@@ -191,24 +187,6 @@ static void timespec_from_timeout( struct timespec *timespec, const LARGE_INTEGE
|
||||
@@ -190,24 +186,6 @@ static void timespec_from_timeout( struct timespec *timespec, const LARGE_INTEGE
|
||||
#endif
|
||||
|
||||
|
||||
@ -314,7 +314,7 @@ index 0fee8f3099d..d68dfbbf6af 100644
|
||||
/* create a struct security_descriptor and contained information in one contiguous piece of memory */
|
||||
NTSTATUS alloc_object_attributes( const OBJECT_ATTRIBUTES *attr, struct object_attributes **ret,
|
||||
data_size_t *ret_len )
|
||||
@@ -2892,71 +2870,6 @@ NTSTATUS CDECL fast_RtlWakeConditionVariable( RTL_CONDITION_VARIABLE *variable,
|
||||
@@ -2836,71 +2814,6 @@ NTSTATUS CDECL fast_RtlWakeConditionVariable( RTL_CONDITION_VARIABLE *variable,
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
@ -386,7 +386,7 @@ index 0fee8f3099d..d68dfbbf6af 100644
|
||||
#else
|
||||
|
||||
NTSTATUS CDECL fast_RtlTryAcquireSRWLockExclusive( RTL_SRWLOCK *lock )
|
||||
@@ -2999,79 +2912,4 @@ NTSTATUS CDECL fast_wait_cv( RTL_CONDITION_VARIABLE *variable, const void *value
|
||||
@@ -2943,79 +2856,4 @@ NTSTATUS CDECL fast_wait_cv( RTL_CONDITION_VARIABLE *variable, const void *value
|
||||
return STATUS_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
@ -467,15 +467,15 @@ index 0fee8f3099d..d68dfbbf6af 100644
|
||||
- mutex_unlock( &addr_mutex );
|
||||
-}
|
||||
diff --git a/dlls/ntdll/unixlib.h b/dlls/ntdll/unixlib.h
|
||||
index 71cc4177c06..7d5bfa8e249 100644
|
||||
index 80e4eaefc75..72d115a556b 100644
|
||||
--- a/dlls/ntdll/unixlib.h
|
||||
+++ b/dlls/ntdll/unixlib.h
|
||||
@@ -37,7 +37,7 @@ enum loadorder
|
||||
};
|
||||
|
||||
/* increment this when you change the function table */
|
||||
-#define NTDLL_UNIXLIB_VERSION 118
|
||||
+#define NTDLL_UNIXLIB_VERSION 119
|
||||
-#define NTDLL_UNIXLIB_VERSION 119
|
||||
+#define NTDLL_UNIXLIB_VERSION 120
|
||||
|
||||
struct unix_funcs
|
||||
{
|
||||
@ -491,5 +491,5 @@ index 71cc4177c06..7d5bfa8e249 100644
|
||||
/* fast locks */
|
||||
NTSTATUS (CDECL *fast_RtlpWaitForCriticalSection)( RTL_CRITICAL_SECTION *crit, int timeout );
|
||||
--
|
||||
2.30.1
|
||||
2.30.2
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From badd87317d22d40c86b646d03ca60e69a0258bb1 Mon Sep 17 00:00:00 2001
|
||||
From fd2100138729eece59f3af37c59ee6b166085cc6 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Mon, 31 Aug 2020 23:38:09 -0500
|
||||
Subject: [PATCH] ntdll: Reimplement the critical section fast path on top of
|
||||
@ -83,10 +83,10 @@ index 09975ac3d45..97a5ce7fffa 100644
|
||||
return ret;
|
||||
}
|
||||
diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c
|
||||
index 10de9ce307a..ef9f160dc00 100644
|
||||
index a962eb46ead..6748c89ccac 100644
|
||||
--- a/dlls/ntdll/unix/loader.c
|
||||
+++ b/dlls/ntdll/unix/loader.c
|
||||
@@ -1552,9 +1552,6 @@ static struct unix_funcs unix_funcs =
|
||||
@@ -1757,9 +1757,6 @@ static struct unix_funcs unix_funcs =
|
||||
#endif
|
||||
DbgUiIssueRemoteBreakin,
|
||||
RtlGetSystemTimePrecise,
|
||||
@ -97,10 +97,10 @@ index 10de9ce307a..ef9f160dc00 100644
|
||||
fast_RtlAcquireSRWLockExclusive,
|
||||
fast_RtlTryAcquireSRWLockShared,
|
||||
diff --git a/dlls/ntdll/unix/sync.c b/dlls/ntdll/unix/sync.c
|
||||
index d68dfbbf6af..48bddbbcea3 100644
|
||||
index 41005425a90..6b97028fb68 100644
|
||||
--- a/dlls/ntdll/unix/sync.c
|
||||
+++ b/dlls/ntdll/unix/sync.c
|
||||
@@ -2465,115 +2465,6 @@ NTSTATUS WINAPI NtWaitForAlertByThreadId( const void *address, const LARGE_INTEG
|
||||
@@ -2409,115 +2409,6 @@ NTSTATUS WINAPI NtWaitForAlertByThreadId( const void *address, const LARGE_INTEG
|
||||
}
|
||||
|
||||
|
||||
@ -217,10 +217,10 @@ index d68dfbbf6af..48bddbbcea3 100644
|
||||
|
||||
/* Futex-based SRW lock implementation:
|
||||
diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h
|
||||
index d37dd001655..5458bf47374 100644
|
||||
index 8d80b824d28..8141554a7cd 100644
|
||||
--- a/dlls/ntdll/unix/unix_private.h
|
||||
+++ b/dlls/ntdll/unix/unix_private.h
|
||||
@@ -101,9 +101,6 @@ extern void (WINAPI *pKiUserApcDispatcher)(CONTEXT*,ULONG_PTR,ULONG_PTR,ULON
|
||||
@@ -105,9 +105,6 @@ extern void (WINAPI *pKiUserApcDispatcher)(CONTEXT*,ULONG_PTR,ULONG_PTR,ULON
|
||||
extern NTSTATUS (WINAPI *pKiUserExceptionDispatcher)(EXCEPTION_RECORD*,CONTEXT*) DECLSPEC_HIDDEN;
|
||||
extern void (WINAPI *pLdrInitializeThunk)(CONTEXT*,void**,ULONG_PTR,ULONG_PTR) DECLSPEC_HIDDEN;
|
||||
extern void (WINAPI *pRtlUserThreadStart)( PRTL_THREAD_START_ROUTINE entry, void *arg ) DECLSPEC_HIDDEN;
|
||||
@ -231,15 +231,15 @@ index d37dd001655..5458bf47374 100644
|
||||
extern NTSTATUS CDECL fast_RtlAcquireSRWLockExclusive( RTL_SRWLOCK *lock ) DECLSPEC_HIDDEN;
|
||||
extern NTSTATUS CDECL fast_RtlTryAcquireSRWLockShared( RTL_SRWLOCK *lock ) DECLSPEC_HIDDEN;
|
||||
diff --git a/dlls/ntdll/unixlib.h b/dlls/ntdll/unixlib.h
|
||||
index 7d5bfa8e249..ad2f1760ebd 100644
|
||||
index 72d115a556b..d7c880eda04 100644
|
||||
--- a/dlls/ntdll/unixlib.h
|
||||
+++ b/dlls/ntdll/unixlib.h
|
||||
@@ -37,7 +37,7 @@ enum loadorder
|
||||
};
|
||||
|
||||
/* increment this when you change the function table */
|
||||
-#define NTDLL_UNIXLIB_VERSION 119
|
||||
+#define NTDLL_UNIXLIB_VERSION 120
|
||||
-#define NTDLL_UNIXLIB_VERSION 120
|
||||
+#define NTDLL_UNIXLIB_VERSION 121
|
||||
|
||||
struct unix_funcs
|
||||
{
|
||||
@ -254,5 +254,5 @@ index 7d5bfa8e249..ad2f1760ebd 100644
|
||||
NTSTATUS (CDECL *fast_RtlAcquireSRWLockExclusive)( RTL_SRWLOCK *lock );
|
||||
NTSTATUS (CDECL *fast_RtlTryAcquireSRWLockShared)( RTL_SRWLOCK *lock );
|
||||
--
|
||||
2.30.1
|
||||
2.30.2
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 6c945e17dea09b64ecaf870a29c36cbfbc6507e4 Mon Sep 17 00:00:00 2001
|
||||
From 6409c2d12ba290c5bb8c4335988bc144d08b35b7 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Mon, 31 Aug 2020 23:55:29 -0500
|
||||
Subject: [PATCH] ntdll: Get rid of the direct futex path for condition
|
||||
@ -80,10 +80,10 @@ index 97a5ce7fffa..1e6afc4cfc8 100644
|
||||
if (flags & RTL_CONDITION_VARIABLE_LOCKMODE_SHARED)
|
||||
RtlAcquireSRWLockShared( lock );
|
||||
diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c
|
||||
index ef9f160dc00..96aa2142ebb 100644
|
||||
index 6748c89ccac..81d8476e4c6 100644
|
||||
--- a/dlls/ntdll/unix/loader.c
|
||||
+++ b/dlls/ntdll/unix/loader.c
|
||||
@@ -1558,8 +1558,6 @@ static struct unix_funcs unix_funcs =
|
||||
@@ -1763,8 +1763,6 @@ static struct unix_funcs unix_funcs =
|
||||
fast_RtlAcquireSRWLockShared,
|
||||
fast_RtlReleaseSRWLockExclusive,
|
||||
fast_RtlReleaseSRWLockShared,
|
||||
@ -93,10 +93,10 @@ index ef9f160dc00..96aa2142ebb 100644
|
||||
ntdll_ceil,
|
||||
ntdll_cos,
|
||||
diff --git a/dlls/ntdll/unix/sync.c b/dlls/ntdll/unix/sync.c
|
||||
index 48bddbbcea3..c99fa004513 100644
|
||||
index 6b97028fb68..d4092438644 100644
|
||||
--- a/dlls/ntdll/unix/sync.c
|
||||
+++ b/dlls/ntdll/unix/sync.c
|
||||
@@ -167,23 +167,6 @@ static int *get_futex(void **ptr)
|
||||
@@ -166,23 +166,6 @@ static int *get_futex(void **ptr)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -120,7 +120,7 @@ index 48bddbbcea3..c99fa004513 100644
|
||||
#endif
|
||||
|
||||
|
||||
@@ -2717,50 +2700,6 @@ NTSTATUS CDECL fast_RtlReleaseSRWLockShared( RTL_SRWLOCK *lock )
|
||||
@@ -2661,50 +2644,6 @@ NTSTATUS CDECL fast_RtlReleaseSRWLockShared( RTL_SRWLOCK *lock )
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
@ -171,7 +171,7 @@ index 48bddbbcea3..c99fa004513 100644
|
||||
#else
|
||||
|
||||
NTSTATUS CDECL fast_RtlTryAcquireSRWLockExclusive( RTL_SRWLOCK *lock )
|
||||
@@ -2793,14 +2732,4 @@ NTSTATUS CDECL fast_RtlReleaseSRWLockShared( RTL_SRWLOCK *lock )
|
||||
@@ -2737,14 +2676,4 @@ NTSTATUS CDECL fast_RtlReleaseSRWLockShared( RTL_SRWLOCK *lock )
|
||||
return STATUS_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
@ -187,10 +187,10 @@ index 48bddbbcea3..c99fa004513 100644
|
||||
-
|
||||
#endif
|
||||
diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h
|
||||
index 5458bf47374..12f3efc9846 100644
|
||||
index 8141554a7cd..a22e7bdd4f4 100644
|
||||
--- a/dlls/ntdll/unix/unix_private.h
|
||||
+++ b/dlls/ntdll/unix/unix_private.h
|
||||
@@ -107,10 +107,7 @@ extern NTSTATUS CDECL fast_RtlTryAcquireSRWLockShared( RTL_SRWLOCK *lock ) DECLS
|
||||
@@ -111,10 +111,7 @@ extern NTSTATUS CDECL fast_RtlTryAcquireSRWLockShared( RTL_SRWLOCK *lock ) DECLS
|
||||
extern NTSTATUS CDECL fast_RtlAcquireSRWLockShared( RTL_SRWLOCK *lock ) DECLSPEC_HIDDEN;
|
||||
extern NTSTATUS CDECL fast_RtlReleaseSRWLockExclusive( RTL_SRWLOCK *lock ) DECLSPEC_HIDDEN;
|
||||
extern NTSTATUS CDECL fast_RtlReleaseSRWLockShared( RTL_SRWLOCK *lock ) DECLSPEC_HIDDEN;
|
||||
@ -202,15 +202,15 @@ index 5458bf47374..12f3efc9846 100644
|
||||
extern void CDECL virtual_release_address_space(void) DECLSPEC_HIDDEN;
|
||||
|
||||
diff --git a/dlls/ntdll/unixlib.h b/dlls/ntdll/unixlib.h
|
||||
index ad2f1760ebd..767234fc6d3 100644
|
||||
index d7c880eda04..8518c7fba13 100644
|
||||
--- a/dlls/ntdll/unixlib.h
|
||||
+++ b/dlls/ntdll/unixlib.h
|
||||
@@ -37,7 +37,7 @@ enum loadorder
|
||||
};
|
||||
|
||||
/* increment this when you change the function table */
|
||||
-#define NTDLL_UNIXLIB_VERSION 120
|
||||
+#define NTDLL_UNIXLIB_VERSION 121
|
||||
-#define NTDLL_UNIXLIB_VERSION 121
|
||||
+#define NTDLL_UNIXLIB_VERSION 122
|
||||
|
||||
struct unix_funcs
|
||||
{
|
||||
@ -225,5 +225,5 @@ index ad2f1760ebd..767234fc6d3 100644
|
||||
/* math functions */
|
||||
double (CDECL *atan)( double d );
|
||||
--
|
||||
2.30.1
|
||||
2.30.2
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From f51e61d33f38a050b018107f1615e6cd8a41b1d0 Mon Sep 17 00:00:00 2001
|
||||
From cf50bc7987a6449ada2c801a78697c6299ffb07c Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Sun, 22 Nov 2020 20:51:10 -0600
|
||||
Subject: [PATCH] ntdll: Reimplement SRW locks on top of Win32 futexes.
|
||||
@ -392,10 +392,10 @@ index 1e6afc4cfc8..93a6a5fd7de 100644
|
||||
|
||||
/***********************************************************************
|
||||
diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c
|
||||
index 96aa2142ebb..18857f8f7ac 100644
|
||||
index 81d8476e4c6..575cc38d5f9 100644
|
||||
--- a/dlls/ntdll/unix/loader.c
|
||||
+++ b/dlls/ntdll/unix/loader.c
|
||||
@@ -1552,12 +1552,6 @@ static struct unix_funcs unix_funcs =
|
||||
@@ -1757,12 +1757,6 @@ static struct unix_funcs unix_funcs =
|
||||
#endif
|
||||
DbgUiIssueRemoteBreakin,
|
||||
RtlGetSystemTimePrecise,
|
||||
@ -409,10 +409,10 @@ index 96aa2142ebb..18857f8f7ac 100644
|
||||
ntdll_ceil,
|
||||
ntdll_cos,
|
||||
diff --git a/dlls/ntdll/unix/sync.c b/dlls/ntdll/unix/sync.c
|
||||
index c99fa004513..e64d0853382 100644
|
||||
index d4092438644..b67f5fc8f10 100644
|
||||
--- a/dlls/ntdll/unix/sync.c
|
||||
+++ b/dlls/ntdll/unix/sync.c
|
||||
@@ -115,8 +115,6 @@ static inline ULONGLONG monotonic_counter(void)
|
||||
@@ -114,8 +114,6 @@ static inline ULONGLONG monotonic_counter(void)
|
||||
|
||||
#define FUTEX_WAIT 0
|
||||
#define FUTEX_WAKE 1
|
||||
@ -421,7 +421,7 @@ index c99fa004513..e64d0853382 100644
|
||||
|
||||
static int futex_private = 128;
|
||||
|
||||
@@ -130,16 +128,6 @@ static inline int futex_wake( const int *addr, int val )
|
||||
@@ -129,16 +127,6 @@ static inline int futex_wake( const int *addr, int val )
|
||||
return syscall( __NR_futex, addr, FUTEX_WAKE | futex_private, val, NULL, 0, 0 );
|
||||
}
|
||||
|
||||
@ -438,7 +438,7 @@ index c99fa004513..e64d0853382 100644
|
||||
static inline int use_futexes(void)
|
||||
{
|
||||
static int supported = -1;
|
||||
@@ -157,16 +145,6 @@ static inline int use_futexes(void)
|
||||
@@ -156,16 +144,6 @@ static inline int use_futexes(void)
|
||||
return supported;
|
||||
}
|
||||
|
||||
@ -455,7 +455,7 @@ index c99fa004513..e64d0853382 100644
|
||||
#endif
|
||||
|
||||
|
||||
@@ -2446,290 +2424,3 @@ NTSTATUS WINAPI NtWaitForAlertByThreadId( const void *address, const LARGE_INTEG
|
||||
@@ -2390,290 +2368,3 @@ NTSTATUS WINAPI NtWaitForAlertByThreadId( const void *address, const LARGE_INTEG
|
||||
return NtWaitForSingleObject( ntdll_get_thread_data()->tid_alert_event, FALSE, timeout );
|
||||
#endif
|
||||
}
|
||||
@ -747,10 +747,10 @@ index c99fa004513..e64d0853382 100644
|
||||
-
|
||||
-#endif
|
||||
diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h
|
||||
index 12f3efc9846..0449535c414 100644
|
||||
index a22e7bdd4f4..cf7b194a14b 100644
|
||||
--- a/dlls/ntdll/unix/unix_private.h
|
||||
+++ b/dlls/ntdll/unix/unix_private.h
|
||||
@@ -101,12 +101,6 @@ extern void (WINAPI *pKiUserApcDispatcher)(CONTEXT*,ULONG_PTR,ULONG_PTR,ULON
|
||||
@@ -105,12 +105,6 @@ extern void (WINAPI *pKiUserApcDispatcher)(CONTEXT*,ULONG_PTR,ULONG_PTR,ULON
|
||||
extern NTSTATUS (WINAPI *pKiUserExceptionDispatcher)(EXCEPTION_RECORD*,CONTEXT*) DECLSPEC_HIDDEN;
|
||||
extern void (WINAPI *pLdrInitializeThunk)(CONTEXT*,void**,ULONG_PTR,ULONG_PTR) DECLSPEC_HIDDEN;
|
||||
extern void (WINAPI *pRtlUserThreadStart)( PRTL_THREAD_START_ROUTINE entry, void *arg ) DECLSPEC_HIDDEN;
|
||||
@ -764,15 +764,15 @@ index 12f3efc9846..0449535c414 100644
|
||||
|
||||
extern void CDECL virtual_release_address_space(void) DECLSPEC_HIDDEN;
|
||||
diff --git a/dlls/ntdll/unixlib.h b/dlls/ntdll/unixlib.h
|
||||
index 767234fc6d3..70339c24474 100644
|
||||
index 8518c7fba13..650efb7f5e0 100644
|
||||
--- a/dlls/ntdll/unixlib.h
|
||||
+++ b/dlls/ntdll/unixlib.h
|
||||
@@ -37,7 +37,7 @@ enum loadorder
|
||||
};
|
||||
|
||||
/* increment this when you change the function table */
|
||||
-#define NTDLL_UNIXLIB_VERSION 121
|
||||
+#define NTDLL_UNIXLIB_VERSION 122
|
||||
-#define NTDLL_UNIXLIB_VERSION 122
|
||||
+#define NTDLL_UNIXLIB_VERSION 123
|
||||
|
||||
struct unix_funcs
|
||||
{
|
||||
@ -792,5 +792,5 @@ index 767234fc6d3..70339c24474 100644
|
||||
double (CDECL *atan)( double d );
|
||||
double (CDECL *ceil)( double d );
|
||||
--
|
||||
2.30.1
|
||||
2.30.2
|
||||
|
||||
|
@ -51,7 +51,7 @@ usage()
|
||||
# Get the upstream commit sha
|
||||
upstream_commit()
|
||||
{
|
||||
echo "34652f37e443a9e7698f66d13df3b4811b1c0cc3"
|
||||
echo "71d41b37a1917cdf20cdb171dc73c20dbfdaeefa"
|
||||
}
|
||||
|
||||
# Show version information
|
||||
@ -111,7 +111,6 @@ patch_enable_all ()
|
||||
enable_ddraw_Device_Caps="$1"
|
||||
enable_ddraw_IDirect3DTexture2_Load="$1"
|
||||
enable_ddraw_Silence_FIXMEs="$1"
|
||||
enable_ddraw_Texture_Wrong_Caps="$1"
|
||||
enable_ddraw_version_check="$1"
|
||||
enable_dinput_SetActionMap_genre="$1"
|
||||
enable_dinput_axis_recalc="$1"
|
||||
@ -397,9 +396,6 @@ patch_enable ()
|
||||
ddraw-Silence_FIXMEs)
|
||||
enable_ddraw_Silence_FIXMEs="$2"
|
||||
;;
|
||||
ddraw-Texture_Wrong_Caps)
|
||||
enable_ddraw_Texture_Wrong_Caps="$2"
|
||||
;;
|
||||
ddraw-version-check)
|
||||
enable_ddraw_version_check="$2"
|
||||
;;
|
||||
@ -2043,18 +2039,6 @@ if test "$enable_ddraw_Silence_FIXMEs" -eq 1; then
|
||||
patch_apply ddraw-Silence_FIXMEs/0001-ddraw-Silence-noisy-FIXME-about-unimplemented-D3DPRO.patch
|
||||
fi
|
||||
|
||||
# Patchset ddraw-Texture_Wrong_Caps
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#46948] Allow setting texture without DDSCAPS_TEXTURE for software device
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/ddraw/device.c, dlls/ddraw/tests/ddraw4.c
|
||||
# |
|
||||
if test "$enable_ddraw_Texture_Wrong_Caps" -eq 1; then
|
||||
patch_apply ddraw-Texture_Wrong_Caps/0001-ddraw-Allow-setting-texture-without-DDSCAPS_TEXTURE-.patch
|
||||
fi
|
||||
|
||||
# Patchset ddraw-version-check
|
||||
# |
|
||||
# | This patchset has the following (direct or indirect) dependencies:
|
||||
|
@ -1,43 +0,0 @@
|
||||
From 4508defd1c20893e534824ea07821912745175a8 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
|
||||
Date: Tue, 13 Oct 2020 18:19:17 +0200
|
||||
Subject: [PATCH] windows.globalization: Implement
|
||||
IGlobalizationPreferencesStatics::HomeGeographicRegion semi-stub.
|
||||
|
||||
Returning the system default country.
|
||||
---
|
||||
.../windows.globalization_main.c | 18 ++++++++++++++++--
|
||||
1 file changed, 16 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/windows.globalization.dll/windows.globalization_main.c b/dlls/windows.globalization.dll/windows.globalization_main.c
|
||||
index 5bb0b46866d..83e269bead6 100644
|
||||
--- a/dlls/windows.globalization.dll/windows.globalization_main.c
|
||||
+++ b/dlls/windows.globalization.dll/windows.globalization_main.c
|
||||
@@ -133,8 +133,22 @@ static HRESULT STDMETHODCALLTYPE globalization_preferences_get_Languages(IGlobal
|
||||
static HRESULT STDMETHODCALLTYPE globalization_preferences_get_HomeGeographicRegion(IGlobalizationPreferencesStatics *iface,
|
||||
HSTRING* value)
|
||||
{
|
||||
- FIXME("iface %p, value %p stub!\n", iface, value);
|
||||
- return E_NOTIMPL;
|
||||
+ UINT32 length;
|
||||
+ WCHAR locale_w[LOCALE_NAME_MAX_LENGTH], *tmp;
|
||||
+ const WCHAR *country;
|
||||
+
|
||||
+ TRACE("iface %p, value %p stub!\n", iface, value);
|
||||
+
|
||||
+ GetSystemDefaultLocaleName(locale_w, LOCALE_NAME_MAX_LENGTH);
|
||||
+
|
||||
+ if ((tmp = wcsrchr(locale_w, '_'))) *tmp = 0;
|
||||
+ if (!(tmp = wcschr(locale_w, '-')) || (wcslen(tmp) > 3 && !(tmp = wcschr(tmp + 1, '-')))) country = L"US";
|
||||
+ else country = tmp;
|
||||
+ length = wcslen(country);
|
||||
+
|
||||
+ TRACE("returning country %s\n", debugstr_w(country));
|
||||
+
|
||||
+ return WindowsCreateString(country, length, value);
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE globalization_preferences_get_WeekStartsOn(IGlobalizationPreferencesStatics *iface,
|
||||
--
|
||||
2.20.1
|
||||
|
@ -1,209 +0,0 @@
|
||||
From d9b955f1d36e9356fdf4d069ca2c48269ba3fd9e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
|
||||
Date: Tue, 13 Oct 2020 18:20:27 +0200
|
||||
Subject: [PATCH] windows.globalization: Implement
|
||||
IGlobalizationPreferencesStatics::Languages semi-stub.
|
||||
|
||||
Returning system default language in a 1-element HSTRING vector.
|
||||
---
|
||||
.../windows.globalization_main.c | 177 +++++++++++++++++-
|
||||
1 file changed, 175 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/windows.globalization.dll/windows.globalization_main.c b/dlls/windows.globalization.dll/windows.globalization_main.c
|
||||
index 83e269bead6..0d7a1bd6dcf 100644
|
||||
--- a/dlls/windows.globalization.dll/windows.globalization_main.c
|
||||
+++ b/dlls/windows.globalization.dll/windows.globalization_main.c
|
||||
@@ -29,6 +29,165 @@ static const char *debugstr_hstring(HSTRING hstr)
|
||||
return wine_dbgstr_wn(str, len);
|
||||
}
|
||||
|
||||
+struct hstring_vector
|
||||
+{
|
||||
+ IVectorView_HSTRING IVectorView_HSTRING_iface;
|
||||
+ LONG ref;
|
||||
+
|
||||
+ ULONG count;
|
||||
+ HSTRING values[0];
|
||||
+};
|
||||
+
|
||||
+static inline struct hstring_vector *impl_from_IVectorView_HSTRING(IVectorView_HSTRING *iface)
|
||||
+{
|
||||
+ return CONTAINING_RECORD(iface, struct hstring_vector, IVectorView_HSTRING_iface);
|
||||
+}
|
||||
+
|
||||
+static HRESULT STDMETHODCALLTYPE hstring_vector_QueryInterface(
|
||||
+ IVectorView_HSTRING *iface, REFIID iid, void **out)
|
||||
+{
|
||||
+ struct hstring_vector *This = impl_from_IVectorView_HSTRING(iface);
|
||||
+
|
||||
+ FIXME("iface %p, iid %s, out %p stub!\n", iface, debugstr_guid(iid), out);
|
||||
+
|
||||
+ if (!out) return E_INVALIDARG;
|
||||
+
|
||||
+ *out = NULL;
|
||||
+ if (!IsEqualIID(&IID_IUnknown, iid) &&
|
||||
+ !IsEqualIID(&IID_IInspectable, iid) &&
|
||||
+ !IsEqualIID(&IID_IVectorView_HSTRING, iid))
|
||||
+ {
|
||||
+ FIXME("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(iid));
|
||||
+ return E_NOINTERFACE;
|
||||
+ }
|
||||
+
|
||||
+ *out = &This->IVectorView_HSTRING_iface;
|
||||
+ IUnknown_AddRef((IUnknown *)*out);
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
+static ULONG STDMETHODCALLTYPE hstring_vector_AddRef(
|
||||
+ IVectorView_HSTRING *iface)
|
||||
+{
|
||||
+ struct hstring_vector *This = impl_from_IVectorView_HSTRING(iface);
|
||||
+ ULONG ref = InterlockedIncrement(&This->ref);
|
||||
+ FIXME("iface %p -> ref %u.\n", iface, ref);
|
||||
+ return ref;
|
||||
+}
|
||||
+
|
||||
+static ULONG STDMETHODCALLTYPE hstring_vector_Release(
|
||||
+ IVectorView_HSTRING *iface)
|
||||
+{
|
||||
+ struct hstring_vector *This = impl_from_IVectorView_HSTRING(iface);
|
||||
+ ULONG ref = InterlockedDecrement(&This->ref);
|
||||
+ FIXME("iface %p -> ref %u.\n", iface, ref);
|
||||
+ if (ref == 0)
|
||||
+ {
|
||||
+ while (This->count--) WindowsDeleteString(This->values[This->count]);
|
||||
+ HeapFree(GetProcessHeap(), 0, This);
|
||||
+ }
|
||||
+ return ref;
|
||||
+}
|
||||
+
|
||||
+static HRESULT STDMETHODCALLTYPE hstring_vector_GetIids(
|
||||
+ IVectorView_HSTRING *iface, ULONG *iid_count, IID **iids)
|
||||
+{
|
||||
+ FIXME("iface %p, iid_count %p, iids %p stub!\n", iface, iid_count, iids);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT STDMETHODCALLTYPE hstring_vector_GetRuntimeClassName(
|
||||
+ IVectorView_HSTRING *iface, HSTRING *class_name)
|
||||
+{
|
||||
+ FIXME("iface %p, class_name %p stub!\n", iface, class_name);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT STDMETHODCALLTYPE hstring_vector_GetTrustLevel(
|
||||
+ IVectorView_HSTRING *iface, TrustLevel *trust_level)
|
||||
+{
|
||||
+ FIXME("iface %p, trust_level %p stub!\n", iface, trust_level);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT STDMETHODCALLTYPE hstring_vector_GetAt(
|
||||
+ IVectorView_HSTRING *iface, ULONG index, HSTRING *value)
|
||||
+{
|
||||
+ struct hstring_vector *This = impl_from_IVectorView_HSTRING(iface);
|
||||
+
|
||||
+ FIXME("iface %p, index %#x, value %p stub!\n", iface, index, value);
|
||||
+
|
||||
+ if (index >= This->count) return E_BOUNDS;
|
||||
+ return WindowsDuplicateString(This->values[index], value);
|
||||
+}
|
||||
+
|
||||
+static HRESULT STDMETHODCALLTYPE hstring_vector_get_Size(
|
||||
+ IVectorView_HSTRING *iface, ULONG *value)
|
||||
+{
|
||||
+ struct hstring_vector *This = impl_from_IVectorView_HSTRING(iface);
|
||||
+
|
||||
+ FIXME("iface %p, value %p stub!\n", iface, value);
|
||||
+
|
||||
+ *value = This->count;
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
+static HRESULT STDMETHODCALLTYPE hstring_vector_IndexOf(
|
||||
+ IVectorView_HSTRING *iface, HSTRING element, ULONG *index, BOOLEAN *value)
|
||||
+{
|
||||
+ FIXME("iface %p, element %p, index %p, value %p stub!\n", iface, element, index, value);
|
||||
+ *value = FALSE;
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
+static HRESULT STDMETHODCALLTYPE hstring_vector_GetMany(
|
||||
+ IVectorView_HSTRING *iface, ULONG start_index, HSTRING *items, UINT *count)
|
||||
+{
|
||||
+ struct hstring_vector *This = impl_from_IVectorView_HSTRING(iface);
|
||||
+ HRESULT hr;
|
||||
+ ULONG i;
|
||||
+
|
||||
+ FIXME("iface %p, start_index %#x, items %p, count %p stub!\n", iface, start_index, items, count);
|
||||
+
|
||||
+ for (i = start_index; i < This->count; ++i)
|
||||
+ if (FAILED(hr = WindowsDuplicateString(This->values[i], items + i - start_index)))
|
||||
+ return hr;
|
||||
+ *count = This->count - start_index;
|
||||
+
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
+static const struct IVectorView_HSTRINGVtbl hstring_vector_vtbl =
|
||||
+{
|
||||
+ hstring_vector_QueryInterface,
|
||||
+ hstring_vector_AddRef,
|
||||
+ hstring_vector_Release,
|
||||
+ /* IInspectable methods */
|
||||
+ hstring_vector_GetIids,
|
||||
+ hstring_vector_GetRuntimeClassName,
|
||||
+ hstring_vector_GetTrustLevel,
|
||||
+ /* IVectorView<HSTRING> methods */
|
||||
+ hstring_vector_GetAt,
|
||||
+ hstring_vector_get_Size,
|
||||
+ hstring_vector_IndexOf,
|
||||
+ hstring_vector_GetMany,
|
||||
+};
|
||||
+
|
||||
+static HRESULT hstring_vector_create(HSTRING *values, SIZE_T count, IVectorView_HSTRING **out)
|
||||
+{
|
||||
+ struct hstring_vector *This;
|
||||
+
|
||||
+ if (!(This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This) + count * sizeof(HSTRING)))) return E_OUTOFMEMORY;
|
||||
+ This->ref = 1;
|
||||
+
|
||||
+ This->IVectorView_HSTRING_iface.lpVtbl = &hstring_vector_vtbl;
|
||||
+ This->count = count;
|
||||
+ memcpy(This->values, values, count * sizeof(HSTRING));
|
||||
+
|
||||
+ *out = &This->IVectorView_HSTRING_iface;
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
struct windows_globalization
|
||||
{
|
||||
IActivationFactory IActivationFactory_iface;
|
||||
@@ -126,8 +285,22 @@ static HRESULT STDMETHODCALLTYPE globalization_preferences_get_Currencies(IGloba
|
||||
static HRESULT STDMETHODCALLTYPE globalization_preferences_get_Languages(IGlobalizationPreferencesStatics *iface,
|
||||
IVectorView_HSTRING **value)
|
||||
{
|
||||
- FIXME("iface %p, value %p stub!\n", iface, value);
|
||||
- return E_NOTIMPL;
|
||||
+ HSTRING hstring;
|
||||
+ UINT32 length;
|
||||
+ WCHAR locale_w[LOCALE_NAME_MAX_LENGTH], *tmp;
|
||||
+
|
||||
+ FIXME("iface %p, value %p semi-stub!\n", iface, value);
|
||||
+
|
||||
+ GetSystemDefaultLocaleName(locale_w, LOCALE_NAME_MAX_LENGTH);
|
||||
+
|
||||
+ if ((tmp = wcsrchr(locale_w, '_'))) *tmp = 0;
|
||||
+ if ((tmp = wcschr(locale_w, '-')) && (wcslen(tmp) <= 3 || (tmp = wcschr(tmp + 1, '-')))) *tmp = 0;
|
||||
+ length = wcslen(locale_w);
|
||||
+
|
||||
+ FIXME("returning language %s\n", debugstr_w(locale_w));
|
||||
+
|
||||
+ WindowsCreateString(locale_w, length, &hstring);
|
||||
+ return hstring_vector_create(&hstring, 1, value);
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE globalization_preferences_get_HomeGeographicRegion(IGlobalizationPreferencesStatics *iface,
|
||||
--
|
||||
2.20.1
|
||||
|
@ -1,42 +0,0 @@
|
||||
From 6538767a19e1d6ea0a50501b727be6851b765acd Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
|
||||
Date: Tue, 13 Oct 2020 18:11:35 +0200
|
||||
Subject: [PATCH] windows.globalization: Fake empty
|
||||
IGlobalizationPreferencesStatics properties.
|
||||
|
||||
---
|
||||
dlls/windows.globalization.dll/windows.globalization_main.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/windows.globalization.dll/windows.globalization_main.c b/dlls/windows.globalization.dll/windows.globalization_main.c
|
||||
index 0d7a1bd6dcf..ff33cf40bdc 100644
|
||||
--- a/dlls/windows.globalization.dll/windows.globalization_main.c
|
||||
+++ b/dlls/windows.globalization.dll/windows.globalization_main.c
|
||||
@@ -265,21 +265,21 @@ static HRESULT STDMETHODCALLTYPE globalization_preferences_get_Calendars(IGlobal
|
||||
IVectorView_HSTRING **value)
|
||||
{
|
||||
FIXME("iface %p, value %p stub!\n", iface, value);
|
||||
- return E_NOTIMPL;
|
||||
+ return hstring_vector_create(NULL, 0, value);
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE globalization_preferences_get_Clocks(IGlobalizationPreferencesStatics *iface,
|
||||
IVectorView_HSTRING **value)
|
||||
{
|
||||
FIXME("iface %p, value %p stub!\n", iface, value);
|
||||
- return E_NOTIMPL;
|
||||
+ return hstring_vector_create(NULL, 0, value);
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE globalization_preferences_get_Currencies(IGlobalizationPreferencesStatics *iface,
|
||||
IVectorView_HSTRING **value)
|
||||
{
|
||||
FIXME("iface %p, value %p stub!\n", iface, value);
|
||||
- return E_NOTIMPL;
|
||||
+ return hstring_vector_create(NULL, 0, value);
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE globalization_preferences_get_Languages(IGlobalizationPreferencesStatics *iface,
|
||||
--
|
||||
2.20.1
|
||||
|
@ -1,3 +0,0 @@
|
||||
Fixes: [49740] windows.globalization: New DLL
|
||||
Fixes: [49998] windows.globalization: New DLL
|
||||
Disabled: True
|
@ -1,4 +1,3 @@
|
||||
Fixes: [46534] windows.networking.connectivity: New DLL
|
||||
Depends: windows.globalization-dll
|
||||
# In the process of upstreaming.
|
||||
Disabled: true
|
||||
|
@ -1 +1 @@
|
||||
34652f37e443a9e7698f66d13df3b4811b1c0cc3
|
||||
71d41b37a1917cdf20cdb171dc73c20dbfdaeefa
|
||||
|
Loading…
Reference in New Issue
Block a user