winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
March 2020
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
1 participants
996 discussions
Start a n
N
ew thread
Zhiyi Zhang : d3d8/tests: Fix possible test failures.
by Alexandre Julliard
31 Mar '20
31 Mar '20
Module: wine Branch: master Commit: 0bd130f213a2c5a4c06c30785703316d1d73ea4a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0bd130f213a2c5a4c06c3078…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Tue Mar 31 21:39:19 2020 +0800 d3d8/tests: Fix possible test failures. expect_messages points to a local variable. When it goes out of scope, it reads into random memory, causing failures. Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d8/tests/device.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/dlls/d3d8/tests/device.c b/dlls/d3d8/tests/device.c index d87832b716..b7aa02adab 100644 --- a/dlls/d3d8/tests/device.c +++ b/dlls/d3d8/tests/device.c @@ -2662,6 +2662,7 @@ static void test_wndproc(void) { struct wndproc_thread_param thread_params; struct device_desc device_desc; + static WINDOWPOS windowpos; IDirect3DDevice8 *device; WNDCLASSA wc = {0}; IDirect3D8 *d3d8; @@ -2677,7 +2678,6 @@ static void test_wndproc(void) DEVMODEW devmode; LONG change_ret, device_style; BOOL ret; - WINDOWPOS windowpos; static const struct message create_messages[] = { @@ -2777,7 +2777,7 @@ static void test_wndproc(void) {WM_SIZE, FOCUS_WINDOW, TRUE, SIZE_MAXIMIZED}, {0, 0, FALSE, 0}, }; - struct message mode_change_messages[] = + static const struct message mode_change_messages[] = { {WM_WINDOWPOSCHANGING, DEVICE_WINDOW, FALSE, 0}, {WM_WINDOWPOSCHANGED, DEVICE_WINDOW, FALSE, 0}, @@ -2790,7 +2790,7 @@ static void test_wndproc(void) * ShowWindow does not send such a message because the window is already visible. */ {0, 0, FALSE, 0}, }; - struct message mode_change_messages_hidden[] = + static const struct message mode_change_messages_hidden[] = { {WM_WINDOWPOSCHANGING, DEVICE_WINDOW, FALSE, 0}, {WM_WINDOWPOSCHANGED, DEVICE_WINDOW, FALSE, 0}, @@ -2857,6 +2857,9 @@ static void test_wndproc(void) return; } + filter_messages = NULL; + expect_messages = NULL; + wc.lpfnWndProc = test_proc; wc.lpszClassName = "d3d8_test_wndproc_wc"; ok(RegisterClassA(&wc), "Failed to register window class.\n"); @@ -3200,6 +3203,7 @@ static void test_wndproc(void) flush_events(); ok(!expect_messages->message, "Expected message %#x for window %#x, but didn't receive it, i=%u.\n", expect_messages->message, expect_messages->window, i); + expect_messages = NULL; /* World of Warplanes hides the window by removing WS_VISIBLE and expects Reset() to show it again. */ device_style = GetWindowLongA(device_window, GWL_STYLE); @@ -3219,6 +3223,7 @@ static void test_wndproc(void) flush_events(); ok(!expect_messages->message, "Expected message %#x for window %#x, but didn't receive it.\n", expect_messages->message, expect_messages->window); + expect_messages = NULL; ok(windowpos.hwnd == device_window && !windowpos.hwndInsertAfter && !windowpos.x && !windowpos.y && !windowpos.cx && !windowpos.cy @@ -3242,6 +3247,7 @@ static void test_wndproc(void) done: filter_messages = NULL; + expect_messages = NULL; IDirect3D8_Release(d3d8); SetEvent(thread_params.test_finished); @@ -3272,6 +3278,9 @@ static void test_wndproc_windowed(void) d3d8 = Direct3DCreate8(D3D_SDK_VERSION); ok(!!d3d8, "Failed to create a D3D object.\n"); + filter_messages = NULL; + expect_messages = NULL; + wc.lpfnWndProc = test_proc; wc.lpszClassName = "d3d8_test_wndproc_wc"; ok(RegisterClassA(&wc), "Failed to register window class.\n"); @@ -4177,6 +4186,9 @@ static void test_device_window_reset(void) HRESULT hr; ULONG ref; + filter_messages = NULL; + expect_messages = NULL; + wc.lpfnWndProc = test_proc; wc.lpszClassName = "d3d8_test_wndproc_wc"; ok(RegisterClassA(&wc), "Failed to register window class.\n");
1
0
0
0
Myah Caron : ucrtbase: Export _o___stdio_common_v[fs]wprintf functions.
by Alexandre Julliard
31 Mar '20
31 Mar '20
Module: wine Branch: master Commit: 63b294a9bc456e9ab0d0266dcc83ff78d9107077 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=63b294a9bc456e9ab0d0266d…
Author: Myah Caron <qsniyg(a)mail.com> Date: Tue Mar 31 15:48:44 2020 +0200 ucrtbase: Export _o___stdio_common_v[fs]wprintf functions. Signed-off-by: Myah Caron <qsniyg(a)mail.com> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/api-ms-win-crt-private-l1-1-0/api-ms-win-crt-private-l1-1-0.spec | 4 ++-- dlls/ucrtbase/ucrtbase.spec | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/api-ms-win-crt-private-l1-1-0/api-ms-win-crt-private-l1-1-0.spec b/dlls/api-ms-win-crt-private-l1-1-0/api-ms-win-crt-private-l1-1-0.spec index 668b8c02fb..01f295f25f 100644 --- a/dlls/api-ms-win-crt-private-l1-1-0/api-ms-win-crt-private-l1-1-0.spec +++ b/dlls/api-ms-win-crt-private-l1-1-0/api-ms-win-crt-private-l1-1-0.spec @@ -150,7 +150,7 @@ @ stub _o___stdio_common_vfprintf_p @ stub _o___stdio_common_vfprintf_s @ stub _o___stdio_common_vfscanf -@ stub _o___stdio_common_vfwprintf +@ cdecl _o___stdio_common_vfwprintf(int64 ptr wstr ptr ptr) ucrtbase._o___stdio_common_vfwprintf @ stub _o___stdio_common_vfwprintf_p @ stub _o___stdio_common_vfwprintf_s @ stub _o___stdio_common_vfwscanf @@ -160,7 +160,7 @@ @ stub _o___stdio_common_vsprintf_p @ cdecl _o___stdio_common_vsprintf_s(int64 ptr long str ptr ptr) ucrtbase._o___stdio_common_vsprintf_s @ stub _o___stdio_common_vsscanf -@ stub _o___stdio_common_vswprintf +@ cdecl _o___stdio_common_vswprintf(int64 ptr long wstr ptr ptr) ucrtbase._o___stdio_common_vswprintf @ stub _o___stdio_common_vswprintf_p @ stub _o___stdio_common_vswprintf_s @ stub _o___stdio_common_vswscanf diff --git a/dlls/ucrtbase/ucrtbase.spec b/dlls/ucrtbase/ucrtbase.spec index c4807128a1..1c039d0715 100644 --- a/dlls/ucrtbase/ucrtbase.spec +++ b/dlls/ucrtbase/ucrtbase.spec @@ -814,7 +814,7 @@ @ stub _o___stdio_common_vfprintf_p @ stub _o___stdio_common_vfprintf_s @ stub _o___stdio_common_vfscanf -@ stub _o___stdio_common_vfwprintf +@ cdecl _o___stdio_common_vfwprintf(int64 ptr wstr ptr ptr) MSVCRT__stdio_common_vfwprintf @ stub _o___stdio_common_vfwprintf_p @ stub _o___stdio_common_vfwprintf_s @ stub _o___stdio_common_vfwscanf @@ -824,7 +824,7 @@ @ stub _o___stdio_common_vsprintf_p @ cdecl _o___stdio_common_vsprintf_s(int64 ptr long str ptr ptr) MSVCRT__stdio_common_vsprintf_s @ stub _o___stdio_common_vsscanf -@ stub _o___stdio_common_vswprintf +@ cdecl _o___stdio_common_vswprintf(int64 ptr long wstr ptr ptr) MSVCRT__stdio_common_vswprintf @ stub _o___stdio_common_vswprintf_p @ stub _o___stdio_common_vswprintf_s @ stub _o___stdio_common_vswscanf
1
0
0
0
Zhiyi Zhang : winex11.drv: Get the minimum screen size from XRRGetScreenSizeRange().
by Alexandre Julliard
31 Mar '20
31 Mar '20
Module: wine Branch: master Commit: 7347b442af571c12adf5bc8ecf83ee91b2e253a2 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7347b442af571c12adf5bc8e…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Mon Mar 30 22:38:28 2020 +0800 winex11.drv: Get the minimum screen size from XRRGetScreenSizeRange(). RandR minimum screen size is not necessarily 0x0. Some drivers report resolutions smaller than the minimum screen size. When Wine tries to switch to these resolutions, a X error is generated and causes process exit. Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winex11.drv/xrandr.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dlls/winex11.drv/xrandr.c b/dlls/winex11.drv/xrandr.c index 930e0282be..bdfe3d42d9 100644 --- a/dlls/winex11.drv/xrandr.c +++ b/dlls/winex11.drv/xrandr.c @@ -60,6 +60,7 @@ MAKE_FUNCPTR(XRRFreeScreenResources) MAKE_FUNCPTR(XRRGetCrtcInfo) MAKE_FUNCPTR(XRRGetOutputInfo) MAKE_FUNCPTR(XRRGetScreenResources) +MAKE_FUNCPTR(XRRGetScreenSizeRange) MAKE_FUNCPTR(XRRSetCrtcConfig) MAKE_FUNCPTR(XRRSetScreenSize) static typeof(XRRGetScreenResources) *pXRRGetScreenResourcesCurrent; @@ -114,6 +115,7 @@ static int load_xrandr(void) LOAD_FUNCPTR(XRRGetCrtcInfo) LOAD_FUNCPTR(XRRGetOutputInfo) LOAD_FUNCPTR(XRRGetScreenResources) + LOAD_FUNCPTR(XRRGetScreenSizeRange) LOAD_FUNCPTR(XRRSetCrtcConfig) LOAD_FUNCPTR(XRRSetScreenSize) r = 2; @@ -361,9 +363,13 @@ static int xrandr12_get_current_mode(void) static void get_screen_size( XRRScreenResources *resources, unsigned int *width, unsigned int *height ) { + int min_width = 0, min_height = 0, max_width, max_height; XRRCrtcInfo *crtc_info; int i; - *width = *height = 0; + + pXRRGetScreenSizeRange( gdi_display, root_window, &min_width, &min_height, &max_width, &max_height ); + *width = min_width; + *height = min_height; for (i = 0; i < resources->ncrtc; ++i) {
1
0
0
0
Paul Gofman : ddraw: Reserve extra space for video memory surfaces in compatibility mode.
by Alexandre Julliard
31 Mar '20
31 Mar '20
Module: wine Branch: master Commit: d0ff5e66a7611511426a8ff902a95ab22c545f78 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d0ff5e66a7611511426a8ff9…
Author: Paul Gofman <gofmanp(a)gmail.com> Date: Fri Mar 27 23:31:41 2020 +0300 ddraw: Reserve extra space for video memory surfaces in compatibility mode. Some old apps write surface data past the end of locked space. That used to work on early ddraw hardware as locked surface provided direct access to video memory mapped to CPU address space and such access could often go without issues. Currently ddraw on Windows allocates bigger buffers for video memory surfaces when 8 or 16 bit display mode is requested. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=48788
Signed-off-by: Paul Gofman <gofmanp(a)gmail.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ddraw/ddraw_private.h | 2 ++ dlls/ddraw/surface.c | 61 +++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 60 insertions(+), 3 deletions(-) diff --git a/dlls/ddraw/ddraw_private.h b/dlls/ddraw/ddraw_private.h index f4fe970a61..83e3ee10c0 100644 --- a/dlls/ddraw/ddraw_private.h +++ b/dlls/ddraw/ddraw_private.h @@ -219,6 +219,8 @@ struct ddraw_texture struct ddraw_surface *root; struct wined3d_device *wined3d_device; + + void *texture_memory; }; HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_desc, diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c index 9850a1e8c9..3f737d1294 100644 --- a/dlls/ddraw/surface.c +++ b/dlls/ddraw/surface.c @@ -5832,8 +5832,11 @@ static const struct wined3d_parent_ops ddraw_surface_wined3d_parent_ops = static void STDMETHODCALLTYPE ddraw_texture_wined3d_object_destroyed(void *parent) { - TRACE("parent %p.\n", parent); + struct ddraw_texture *texture = parent; + TRACE("texture %p, texture_memory %p.\n", texture, texture->texture_memory); + + heap_free(texture->texture_memory); heap_free(parent); } @@ -5847,18 +5850,50 @@ static HRESULT CDECL ddraw_reset_enum_callback(struct wined3d_resource *resource return DD_OK; } +static HRESULT ddraw_surface_reserve_memory(struct wined3d_texture *wined3d_texture) +{ + static const unsigned int extra_size = 0x10000; + + struct ddraw_texture *texture = wined3d_texture_get_parent(wined3d_texture); + struct wined3d_resource_desc desc; + unsigned int pitch, slice_pitch; + HRESULT hr; + + wined3d_resource_get_desc(wined3d_texture_get_resource(wined3d_texture), &desc); + if (!(texture->texture_memory = heap_alloc_zero(desc.size + extra_size))) + { + ERR("Out of memory.\n"); + return E_OUTOFMEMORY; + } + TRACE("texture->texture_memory %p.\n", texture->texture_memory); + + wined3d_texture_get_pitch(wined3d_texture, 0, &pitch, &slice_pitch); + + if (FAILED(hr = wined3d_texture_update_desc(wined3d_texture, + desc.width, desc.height, desc.format, + WINED3D_MULTISAMPLE_NONE, 0, texture->texture_memory, pitch))) + { + heap_free(texture->texture_memory); + texture->texture_memory = NULL; + } + + return hr; +} + HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_desc, struct ddraw_surface **surface, IUnknown *outer_unknown, unsigned int version) { struct wined3d_sub_resource_desc wined3d_mip_desc; struct ddraw_surface *root, *mip, **attach; struct wined3d_resource_desc wined3d_desc; + DDPIXELFORMAT wined3d_display_mode_format; struct wined3d_texture *wined3d_texture; struct wined3d_display_mode mode; DDSURFACEDESC2 *desc, *mip_desc; struct ddraw_texture *texture; unsigned int layers = 1; unsigned int pitch = 0; + BOOL reserve_memory; UINT levels, i, j; HRESULT hr; @@ -5879,6 +5914,7 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_ if (!(texture = heap_alloc(sizeof(*texture)))) return E_OUTOFMEMORY; + texture->texture_memory = NULL; texture->version = version; texture->surface_desc = *surface_desc; desc = &texture->surface_desc; @@ -6020,12 +6056,14 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_ return hr_ddraw_from_wined3d(hr); } + wined3d_display_mode_format.dwSize = sizeof(wined3d_display_mode_format); + ddrawformat_from_wined3dformat(&wined3d_display_mode_format, mode.format_id); + /* No pixelformat given? Use the current screen format. */ if (!(desc->dwFlags & DDSD_PIXELFORMAT)) { desc->dwFlags |= DDSD_PIXELFORMAT; - desc->u4.ddpfPixelFormat.dwSize = sizeof(desc->u4.ddpfPixelFormat); - ddrawformat_from_wined3dformat(&desc->u4.ddpfPixelFormat, mode.format_id); + desc->u4.ddpfPixelFormat = wined3d_display_mode_format; } wined3d_desc.resource_type = WINED3D_RTYPE_TEXTURE_2D; @@ -6434,6 +6472,16 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_ goto fail; } + reserve_memory = !(desc->dwFlags & DDSD_LPSURFACE) + && desc->ddsCaps.dwCaps & DDSCAPS_VIDEOMEMORY + && wined3d_display_mode_format.u1.dwRGBBitCount <= 16; + + if (reserve_memory && FAILED(hr = ddraw_surface_reserve_memory(wined3d_texture))) + { + ERR("Failed to reserve surface memory, hr %#x.\n", hr); + goto fail; + } + if (desc->dwFlags & DDSD_BACKBUFFERCOUNT) { unsigned int count = desc->u5.dwBackBufferCount; @@ -6448,6 +6496,7 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_ goto fail; } + texture->texture_memory = NULL; texture->version = version; texture->surface_desc = root->surface_desc; desc = &texture->surface_desc; @@ -6487,6 +6536,12 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_ wined3d_texture_set_color_key(wined3d_texture, DDCKEY_SRCBLT, (struct wined3d_color_key *)&desc->ddckCKSrcBlt); + if (reserve_memory && FAILED(hr = ddraw_surface_reserve_memory(wined3d_texture))) + { + hr = hr_ddraw_from_wined3d(hr); + goto fail; + } + *attach = last; attach = &last->complex_array[0]; }
1
0
0
0
Brendan Shanks : winevulkan: Create JSON manifest and registry entry used by official Vulkan loader.
by Alexandre Julliard
31 Mar '20
31 Mar '20
Module: wine Branch: master Commit: dfc159d8747a7480962a5d0495da837f07950602 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=dfc159d8747a7480962a5d04…
Author: Brendan Shanks <bshanks(a)codeweavers.com> Date: Mon Mar 30 17:35:24 2020 -0700 winevulkan: Create JSON manifest and registry entry used by official Vulkan loader. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=47109
Signed-off-by: Brendan Shanks <bshanks(a)codeweavers.com> Signed-off-by: Liam Middlebrook <lmiddlebrook(a)nvidia.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winevulkan/Makefile.in | 4 +- dlls/winevulkan/make_vulkan | 16 +++++++ dlls/winevulkan/vulkan.c | 63 +++++++++++++++++++++++++++ dlls/winevulkan/winevulkan.json | 7 +++ dlls/winevulkan/{version.rc => winevulkan.rc} | 6 ++- dlls/winevulkan/winevulkan.spec | 2 + loader/wine.inf.in | 1 + 7 files changed, 96 insertions(+), 3 deletions(-) diff --git a/dlls/winevulkan/Makefile.in b/dlls/winevulkan/Makefile.in index e0bca6fad7..251de5c68e 100644 --- a/dlls/winevulkan/Makefile.in +++ b/dlls/winevulkan/Makefile.in @@ -1,9 +1,9 @@ MODULE = winevulkan.dll IMPORTLIB = winevulkan -IMPORTS = user32 gdi32 +IMPORTS = user32 gdi32 advapi32 C_SRCS = \ vulkan.c \ vulkan_thunks.c -RC_SRCS = version.rc +RC_SRCS = winevulkan.rc diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan index e5b3a1fdfa..1811d5ae10 100755 --- a/dlls/winevulkan/make_vulkan +++ b/dlls/winevulkan/make_vulkan @@ -71,6 +71,7 @@ WINE_VK_VERSION = (1, 2) WINE_VULKAN_H = "../../include/wine/vulkan.h" WINE_VULKAN_DRIVER_H = "../../include/wine/vulkan_driver.h" WINE_VULKAN_LOADER_SPEC = "../vulkan-1/vulkan-1.spec" +WINE_VULKAN_JSON = "winevulkan.json" WINE_VULKAN_SPEC = "winevulkan.spec" WINE_VULKAN_THUNKS_C = "vulkan_thunks.c" WINE_VULKAN_THUNKS_H = "vulkan_thunks.h" @@ -2526,6 +2527,9 @@ class VkGenerator(object): else: f.write("@ stub {0}\n".format(func.name)) + f.write("@ stdcall -private DllRegisterServer()\n") + f.write("@ stdcall -private DllUnregisterServer()\n") + def generate_vulkan_loader_spec(self, f): self._generate_copyright(f, spec_file=True) @@ -3033,6 +3037,15 @@ class VkRegistry(object): self.handles = sorted(handles, key=lambda handle: handle.name) self.structs = sorted(structs, key=lambda struct: struct.name) +def generate_vulkan_json(f): + f.write("{\n") + f.write(" \"file_format_version\": \"1.0.0\",\n") + f.write(" \"ICD\": {\n") + f.write(" \"library_path\": \".\\\\winevulkan.dll\",\n") + f.write(" \"api_version\": \"{0}\"\n".format(VK_XML_VERSION)) + f.write(" }\n") + f.write("}\n") + def set_working_directory(): path = os.path.abspath(__file__) path = os.path.dirname(path) @@ -3074,6 +3087,9 @@ def main(): with open(WINE_VULKAN_THUNKS_C, "w") as f: generator.generate_thunks_c(f, "wine_") + with open(WINE_VULKAN_JSON, "w") as f: + generate_vulkan_json(f) + with open(WINE_VULKAN_SPEC, "w") as f: generator.generate_vulkan_spec(f) diff --git a/dlls/winevulkan/vulkan.c b/dlls/winevulkan/vulkan.c index 59472bcef8..2779f626a1 100644 --- a/dlls/winevulkan/vulkan.c +++ b/dlls/winevulkan/vulkan.c @@ -21,6 +21,7 @@ #include "windef.h" #include "winbase.h" +#include "winreg.h" #include "winuser.h" #include "vulkan_private.h" @@ -50,6 +51,7 @@ static void *wine_vk_find_struct_(void *s, VkStructureType t) static void *wine_vk_get_global_proc_addr(const char *name); +static HINSTANCE hinstance; static const struct vulkan_funcs *vk_funcs; static VkResult (*p_vkEnumerateInstanceVersion)(uint32_t *version); @@ -1268,6 +1270,7 @@ BOOL WINAPI DllMain(HINSTANCE hinst, DWORD reason, void *reserved) switch (reason) { case DLL_PROCESS_ATTACH: + hinstance = hinst; DisableThreadLibraryCalls(hinst); return wine_vk_init(); } @@ -1307,3 +1310,63 @@ void *native_vkGetInstanceProcAddrWINE(VkInstance instance, const char *name) { return vk_funcs->p_vkGetInstanceProcAddr(instance, name); } + + +static const WCHAR winevulkan_json_resW[] = {'w','i','n','e','v','u','l','k','a','n','_','j','s','o','n',0}; +static const WCHAR winevulkan_json_pathW[] = {'\\','w','i','n','e','v','u','l','k','a','n','.','j','s','o','n',0}; +static const WCHAR vulkan_driversW[] = {'S','o','f','t','w','a','r','e','\\','K','h','r','o','n','o','s','\\', + 'V','u','l','k','a','n','\\','D','r','i','v','e','r','s',0}; + +HRESULT WINAPI DllRegisterServer(void) +{ + WCHAR json_path[MAX_PATH]; + HRSRC rsrc; + const char *data; + DWORD datalen, written, zero = 0; + HANDLE file; + HKEY key; + + /* Create the JSON manifest and registry key to register this ICD with the official Vulkan loader. */ + TRACE("\n"); + rsrc = FindResourceW(hinstance, winevulkan_json_resW, (const WCHAR *)RT_RCDATA); + data = LockResource(LoadResource(hinstance, rsrc)); + datalen = SizeofResource(hinstance, rsrc); + + GetSystemDirectoryW(json_path, ARRAY_SIZE(json_path)); + lstrcatW(json_path, winevulkan_json_pathW); + file = CreateFileW(json_path, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); + if (file == INVALID_HANDLE_VALUE) + { + ERR("Unable to create JSON manifest.\n"); + return E_UNEXPECTED; + } + WriteFile(file, data, datalen, &written, NULL); + CloseHandle(file); + + if (!RegCreateKeyExW(HKEY_LOCAL_MACHINE, vulkan_driversW, 0, NULL, 0, KEY_SET_VALUE, NULL, &key, NULL)) + { + RegSetValueExW(key, json_path, 0, REG_DWORD, (const BYTE *)&zero, sizeof(zero)); + RegCloseKey(key); + } + return S_OK; +} + +HRESULT WINAPI DllUnregisterServer(void) +{ + WCHAR json_path[MAX_PATH]; + HKEY key; + + /* Remove the JSON manifest and registry key */ + TRACE("\n"); + GetSystemDirectoryW(json_path, ARRAY_SIZE(json_path)); + lstrcatW(json_path, winevulkan_json_pathW); + DeleteFileW(json_path); + + if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, vulkan_driversW, 0, KEY_SET_VALUE, &key) == ERROR_SUCCESS) + { + RegDeleteValueW(key, json_path); + RegCloseKey(key); + } + + return S_OK; +} diff --git a/dlls/winevulkan/winevulkan.json b/dlls/winevulkan/winevulkan.json new file mode 100644 index 0000000000..993bf8f949 --- /dev/null +++ b/dlls/winevulkan/winevulkan.json @@ -0,0 +1,7 @@ +{ + "file_format_version": "1.0.0", + "ICD": { + "library_path": ".\\winevulkan.dll", + "api_version": "1.2.134" + } +} diff --git a/dlls/winevulkan/version.rc b/dlls/winevulkan/winevulkan.rc similarity index 91% rename from dlls/winevulkan/version.rc rename to dlls/winevulkan/winevulkan.rc index a62ea75a66..1438e8cd39 100644 --- a/dlls/winevulkan/version.rc +++ b/dlls/winevulkan/winevulkan.rc @@ -1,4 +1,5 @@ -/* +/* Wine Vulkan resources + * * Copyright 2017 Roderick Colenbrander * * This library is free software; you can redistribute it and/or @@ -25,3 +26,6 @@ #define WINE_PRODUCTNAME_STR "Wine Vulkan" #include "wine/wine_common_ver.rc" + +/* @makedep: winevulkan.json */ +winevulkan_json RCDATA winevulkan.json diff --git a/dlls/winevulkan/winevulkan.spec b/dlls/winevulkan/winevulkan.spec index c02af5aeaa..e024a43586 100644 --- a/dlls/winevulkan/winevulkan.spec +++ b/dlls/winevulkan/winevulkan.spec @@ -239,3 +239,5 @@ @ stdcall -private wine_vkUpdateDescriptorSets(ptr long ptr long ptr) @ stdcall -private wine_vkWaitForFences(ptr long ptr long int64) @ stdcall -private wine_vkWaitSemaphores(ptr ptr int64) +@ stdcall -private DllRegisterServer() +@ stdcall -private DllUnregisterServer() diff --git a/loader/wine.inf.in b/loader/wine.inf.in index ed67d5597d..d321c4c826 100644 --- a/loader/wine.inf.in +++ b/loader/wine.inf.in @@ -2570,6 +2570,7 @@ HKLM,%CurrentVersion%\Telephony\Country List\998,"SameAreaRule",,"G" 11,,windowscodecs.dll,1 11,,winegstreamer.dll,1 11,,wineqtdecoder.dll,1 +11,,winevulkan.dll,1 11,,wintrust.dll,1 11,,iexplore.exe,1
1
0
0
0
Alexandre Julliard : ntdll: Use wcsncmp() instead of strncmpW().
by Alexandre Julliard
31 Mar '20
31 Mar '20
Module: wine Branch: master Commit: e36b97e1d0644f90606d27f5104bb09a910540d2 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e36b97e1d0644f90606d27f5…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Mar 31 11:55:51 2020 +0200 ntdll: Use wcsncmp() instead of strncmpW(). Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/actctx.c | 13 ++++++------- dlls/ntdll/directory.c | 3 +-- dlls/ntdll/loadorder.c | 3 +-- dlls/ntdll/locale.c | 7 +++++-- dlls/ntdll/ntdll_misc.h | 1 + dlls/ntdll/process.c | 3 +-- dlls/ntdll/resource.c | 3 +-- 7 files changed, 16 insertions(+), 17 deletions(-) diff --git a/dlls/ntdll/actctx.c b/dlls/ntdll/actctx.c index 6612e33cee..1ca14827a7 100644 --- a/dlls/ntdll/actctx.c +++ b/dlls/ntdll/actctx.c @@ -36,7 +36,6 @@ #include "ntdll_misc.h" #include "wine/exception.h" #include "wine/debug.h" -#include "wine/unicode.h" WINE_DEFAULT_DEBUG_CHANNEL(actctx); @@ -754,7 +753,7 @@ static WCHAR *xmlstrdupW(const xmlstr_t* str) static inline BOOL xmlstr_cmp(const xmlstr_t* xmlstr, const WCHAR *str) { - return !strncmpW(xmlstr->ptr, str, xmlstr->len) && !str[xmlstr->len]; + return !wcsncmp(xmlstr->ptr, str, xmlstr->len) && !str[xmlstr->len]; } static inline BOOL xmlstr_cmpi(const xmlstr_t* xmlstr, const WCHAR *str) @@ -771,8 +770,8 @@ static BOOL xml_name_cmp( const struct xml_elem *elem1, const struct xml_elem *e { return (elem1->name.len == elem2->name.len && elem1->ns.len == elem2->ns.len && - !strncmpW( elem1->name.ptr, elem2->name.ptr, elem1->name.len ) && - !strncmpW( elem1->ns.ptr, elem2->ns.ptr, elem1->ns.len )); + !wcsncmp( elem1->name.ptr, elem2->name.ptr, elem1->name.len ) && + !wcsncmp( elem1->ns.ptr, elem2->ns.ptr, elem1->ns.len )); } static inline BOOL xml_elem_cmp(const struct xml_elem *elem, const WCHAR *str, const WCHAR *namespace) @@ -1230,7 +1229,7 @@ static BOOL is_xmlns_attr( const struct xml_attr *attr ) { const int len = wcslen( xmlnsW ); if (attr->name.len < len) return FALSE; - if (strncmpW( attr->name.ptr, xmlnsW, len )) return FALSE; + if (wcsncmp( attr->name.ptr, xmlnsW, len )) return FALSE; return (attr->name.len == len || attr->name.ptr[len] == ':'); } @@ -1262,7 +1261,7 @@ static xmlstr_t find_xmlns( xmlbuf_t *xmlbuf, const xmlstr_t *name ) for (i = xmlbuf->ns_pos - 1; i >= 0; i--) { if (xmlbuf->namespaces[i].name.len == name->len && - !strncmpW( xmlbuf->namespaces[i].name.ptr, name->ptr, name->len )) + !wcsncmp( xmlbuf->namespaces[i].name.ptr, name->ptr, name->len )) return xmlbuf->namespaces[i].value; } if (xmlbuf->ns_pos) WARN( "namespace %s not found\n", debugstr_xmlstr( name )); @@ -1602,7 +1601,7 @@ static OLEMISC get_olemisc_value(const WCHAR *str, int len) n = (min+max)/2; - c = strncmpW(olemisc_values[n].name, str, len); + c = wcsncmp(olemisc_values[n].name, str, len); if (!c && !olemisc_values[n].name[len]) return olemisc_values[n].value; diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c index 436ddf5366..be55a5a8c1 100644 --- a/dlls/ntdll/directory.c +++ b/dlls/ntdll/directory.c @@ -104,7 +104,6 @@ #include "winternl.h" #include "ddk/wdm.h" #include "ntdll_misc.h" -#include "wine/unicode.h" #include "wine/server.h" #include "wine/list.h" #include "wine/library.h" @@ -2254,7 +2253,7 @@ static int match_redirect( const WCHAR *path, int len, const WCHAR *redir, BOOLE while (i < len && !IS_SEPARATOR(path[i])) i++; if (check_case) { - if (strncmpW( path + start, redir, i - start )) return 0; + if (wcsncmp( path + start, redir, i - start )) return 0; } else { diff --git a/dlls/ntdll/loadorder.c b/dlls/ntdll/loadorder.c index 291cc76031..dad5d915da 100644 --- a/dlls/ntdll/loadorder.c +++ b/dlls/ntdll/loadorder.c @@ -32,7 +32,6 @@ #include "ntdll_misc.h" #include "wine/debug.h" -#include "wine/unicode.h" WINE_DEFAULT_DEBUG_CHANNEL(module); @@ -439,7 +438,7 @@ enum loadorder get_load_order( const WCHAR *app_name, const UNICODE_STRING *nt_n if (!init_done) init_load_order(); std_key = get_standard_key(); if (app_name) app_key = get_app_key( app_name ); - if (!strncmpW( path, nt_prefixW, 4 )) path += 4; + if (!wcsncmp( path, nt_prefixW, 4 )) path += 4; TRACE("looking for %s\n", debugstr_w(path)); diff --git a/dlls/ntdll/locale.c b/dlls/ntdll/locale.c index 9773284f63..ff9d713624 100644 --- a/dlls/ntdll/locale.c +++ b/dlls/ntdll/locale.c @@ -24,6 +24,7 @@ #include <locale.h> #include <langinfo.h> +#include <stdarg.h> #include <string.h> #include <stdlib.h> @@ -34,9 +35,11 @@ #include "ntstatus.h" #define WIN32_NO_STATUS +#include "windef.h" +#include "winbase.h" +#include "winnls.h" #include "ntdll_misc.h" #include "wine/library.h" -#include "wine/unicode.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(nls); @@ -2032,7 +2035,7 @@ NTSTATUS WINAPI RtlIsNormalizedString( ULONG form, const WCHAR *str, INT len, BO WCHAR *buffer = RtlAllocateHeap( GetProcessHeap(), 0, dstlen * sizeof(WCHAR) ); if (!buffer) return STATUS_NO_MEMORY; status = RtlNormalizeString( form, str, len, buffer, &dstlen ); - result = !status && (dstlen == len) && !strncmpW( buffer, str, len ); + result = !status && (dstlen == len) && !wcsncmp( buffer, str, len ); RtlFreeHeap( GetProcessHeap(), 0, buffer ); } *res = result; diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h index a81e13659e..2a91511f0d 100644 --- a/dlls/ntdll/ntdll_misc.h +++ b/dlls/ntdll/ntdll_misc.h @@ -312,6 +312,7 @@ int WINAPIV NTDLL_swprintf( WCHAR *str, const WCHAR *format, ... ); #define wcscspn(s,r) NTDLL_wcscspn(s,r) #define wcsspn(s,a) NTDLL_wcsspn(s,a) #define wcscmp(s1,s2) NTDLL_wcscmp(s1,s2) +#define wcsncmp(s1,s2,n) NTDLL_wcsncmp(s1,s2,n) /* convert from straight ASCII to Unicode without depending on the current codepage */ static inline void ascii_to_unicode( WCHAR *dst, const char *src, size_t len ) diff --git a/dlls/ntdll/process.c b/dlls/ntdll/process.c index fce5a8cdf8..6d506c8530 100644 --- a/dlls/ntdll/process.c +++ b/dlls/ntdll/process.c @@ -53,7 +53,6 @@ #include "wine/exception.h" #include "wine/library.h" #include "wine/server.h" -#include "wine/unicode.h" #ifdef HAVE_MACH_MACH_H #include <mach/mach.h> @@ -1434,7 +1433,7 @@ static ULONG get_env_size( const RTL_USER_PROCESS_PARAMETERS *params, char **win while (*ptr) { static const WCHAR WINEDEBUG[] = {'W','I','N','E','D','E','B','U','G','=',0}; - if (!*winedebug && !strncmpW( ptr, WINEDEBUG, ARRAY_SIZE( WINEDEBUG ) - 1 )) + if (!*winedebug && !wcsncmp( ptr, WINEDEBUG, ARRAY_SIZE( WINEDEBUG ) - 1 )) { DWORD len = wcslen(ptr) * 3 + 1; if ((*winedebug = RtlAllocateHeap( GetProcessHeap(), 0, len ))) diff --git a/dlls/ntdll/resource.c b/dlls/ntdll/resource.c index dec0411ce2..9ebf374b44 100644 --- a/dlls/ntdll/resource.c +++ b/dlls/ntdll/resource.c @@ -43,7 +43,6 @@ #include "ntdll_misc.h" #include "wine/asm.h" #include "wine/exception.h" -#include "wine/unicode.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(resource); @@ -152,7 +151,7 @@ static const IMAGE_RESOURCE_DIRECTORY *find_entry_by_name( const IMAGE_RESOURCE_ { pos = (min + max) / 2; str = (const IMAGE_RESOURCE_DIR_STRING_U *)((const char *)root + entry[pos].u.s.NameOffset); - res = strncmpW( name, str->NameString, str->Length ); + res = wcsncmp( name, str->NameString, str->Length ); if (!res && namelen == str->Length) { if (!entry[pos].u2.s2.DataIsDirectory == !want_dir)
1
0
0
0
Alexandre Julliard : ntdll: Use wcscmp() instead of strcmpW().
by Alexandre Julliard
31 Mar '20
31 Mar '20
Module: wine Branch: master Commit: 4501ab0a7c80e31e602c540a446809e8ae3ebade URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4501ab0a7c80e31e602c540a…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Mar 31 11:54:39 2020 +0200 ntdll: Use wcscmp() instead of strcmpW(). Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/actctx.c | 20 ++++++++++---------- dlls/ntdll/directory.c | 2 +- dlls/ntdll/locale.c | 6 +++--- dlls/ntdll/ntdll_misc.h | 1 + dlls/ntdll/time.c | 3 +-- dlls/ntdll/version.c | 3 +-- 6 files changed, 17 insertions(+), 18 deletions(-) diff --git a/dlls/ntdll/actctx.c b/dlls/ntdll/actctx.c index 0c0d0f41a8..6612e33cee 100644 --- a/dlls/ntdll/actctx.c +++ b/dlls/ntdll/actctx.c @@ -779,12 +779,12 @@ static inline BOOL xml_elem_cmp(const struct xml_elem *elem, const WCHAR *str, c { if (!xmlstr_cmp( &elem->name, str )) return FALSE; if (xmlstr_cmp( &elem->ns, namespace )) return TRUE; - if (!strcmpW( namespace, asmv1W )) + if (!wcscmp( namespace, asmv1W )) { if (xmlstr_cmp( &elem->ns, asmv2W )) return TRUE; if (xmlstr_cmp( &elem->ns, asmv3W )) return TRUE; } - else if (!strcmpW( namespace, asmv2W )) + else if (!wcscmp( namespace, asmv2W )) { if (xmlstr_cmp( &elem->ns, asmv3W )) return TRUE; } @@ -1014,7 +1014,7 @@ static BOOL is_matching_identity( const struct assembly_identity *id1, if (id1->language && id2->language && !is_matching_string( id1->language, id2->language )) { - if (strcmpW( wildcardW, id1->language ) && strcmpW( wildcardW, id2->language )) + if (wcscmp( wildcardW, id1->language ) && wcscmp( wildcardW, id2->language )) return FALSE; } if (id1->version.major != id2->version.major) return FALSE; @@ -2235,7 +2235,7 @@ static void parse_dependent_assembly_elem( xmlbuf_t *xmlbuf, struct actctx_loade { parse_assembly_identity_elem(xmlbuf, acl->actctx, &ai, &elem); /* store the newly found identity for later loading */ - if (ai.arch && !strcmpW(ai.arch, wildcardW)) ai.arch = strdupW( current_archW ); + if (ai.arch && !wcscmp(ai.arch, wildcardW)) ai.arch = strdupW( current_archW ); TRACE( "adding name=%s version=%s arch=%s\n", debugstr_w(ai.name), debugstr_version(&ai.version), debugstr_w(ai.arch) ); if (!add_dependent_assembly_id(acl, &ai)) set_error( xmlbuf ); @@ -4926,8 +4926,8 @@ static const WCHAR *find_app_settings( ACTIVATION_CONTEXT *actctx, const WCHAR * { struct entity *entity = &assembly->entities.base[j]; if (entity->kind == ACTIVATION_CONTEXT_SECTION_APPLICATION_SETTINGS && - !strcmpW( entity->u.settings.name, settings ) && - !strcmpW( entity->u.settings.ns, ns )) + !wcscmp( entity->u.settings.name, settings ) && + !wcscmp( entity->u.settings.ns, ns )) return entity->u.settings.value; } } @@ -5589,10 +5589,10 @@ NTSTATUS WINAPI RtlQueryActivationContextApplicationSettings( DWORD flags, HANDL if (ns) { - if (strcmpW( ns, windowsSettings2005NSW ) && - strcmpW( ns, windowsSettings2011NSW ) && - strcmpW( ns, windowsSettings2016NSW ) && - strcmpW( ns, windowsSettings2017NSW )) + if (wcscmp( ns, windowsSettings2005NSW ) && + wcscmp( ns, windowsSettings2011NSW ) && + wcscmp( ns, windowsSettings2016NSW ) && + wcscmp( ns, windowsSettings2017NSW )) return STATUS_INVALID_PARAMETER; } else ns = windowsSettings2005NSW; diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c index f41b11ec76..436ddf5366 100644 --- a/dlls/ntdll/directory.c +++ b/dlls/ntdll/directory.c @@ -1820,7 +1820,7 @@ static int name_compare( const void *a, const void *b ) const struct dir_data_names *file_b = (const struct dir_data_names *)b; int ret = RtlCompareUnicodeStrings( file_a->long_name, wcslen(file_a->long_name), file_b->long_name, wcslen(file_b->long_name), TRUE ); - if (!ret) ret = strcmpW( file_a->long_name, file_b->long_name ); + if (!ret) ret = wcscmp( file_a->long_name, file_b->long_name ); return ret; } diff --git a/dlls/ntdll/locale.c b/dlls/ntdll/locale.c index 1611a52f1a..9773284f63 100644 --- a/dlls/ntdll/locale.c +++ b/dlls/ntdll/locale.c @@ -847,7 +847,7 @@ static LCID unix_locale_to_lcid( const char *unix_name ) if (!(p = wcspbrk( buffer, sepW ))) { - if (!strcmpW( buffer, posixW ) || !strcmpW( buffer, cW )) + if (!wcscmp( buffer, posixW ) || !wcscmp( buffer, cW )) return MAKELCID( MAKELANGID(LANG_ENGLISH,SUBLANG_DEFAULT), SORT_DEFAULT ); wcscpy( win_name, buffer ); } @@ -877,8 +877,8 @@ static LCID unix_locale_to_lcid( const char *unix_name ) wcscpy( win_name, buffer ); if (modifier) { - if (!strcmpW( modifier, latinW )) wcscat( win_name, latnW ); - else if (!strcmpW( modifier, euroW )) {} /* ignore */ + if (!wcscmp( modifier, latinW )) wcscat( win_name, latnW ); + else if (!wcscmp( modifier, euroW )) {} /* ignore */ else return 0; } if (country) diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h index 1249acbcdd..a81e13659e 100644 --- a/dlls/ntdll/ntdll_misc.h +++ b/dlls/ntdll/ntdll_misc.h @@ -311,6 +311,7 @@ int WINAPIV NTDLL_swprintf( WCHAR *str, const WCHAR *format, ... ); #define wcslen(s) NTDLL_wcslen(s) #define wcscspn(s,r) NTDLL_wcscspn(s,r) #define wcsspn(s,a) NTDLL_wcsspn(s,a) +#define wcscmp(s1,s2) NTDLL_wcscmp(s1,s2) /* convert from straight ASCII to Unicode without depending on the current codepage */ static inline void ascii_to_unicode( WCHAR *dst, const char *src, size_t len ) diff --git a/dlls/ntdll/time.c b/dlls/ntdll/time.c index 21b25df3f3..b42a621aa2 100644 --- a/dlls/ntdll/time.c +++ b/dlls/ntdll/time.c @@ -47,7 +47,6 @@ #include "windef.h" #include "winternl.h" #include "wine/exception.h" -#include "wine/unicode.h" #include "wine/debug.h" #include "ntdll_misc.h" @@ -662,7 +661,7 @@ static int compare_tz_key(const void *a, const void *b) const struct tz_name_map *map_a, *map_b; map_a = (const struct tz_name_map *)a; map_b = (const struct tz_name_map *)b; - return strcmpW(map_a->key_name, map_b->key_name); + return wcscmp(map_a->key_name, map_b->key_name); } static BOOL match_tz_name(const char* tz_name, diff --git a/dlls/ntdll/version.c b/dlls/ntdll/version.c index 3eb16a092e..bb47e39f58 100644 --- a/dlls/ntdll/version.c +++ b/dlls/ntdll/version.c @@ -31,7 +31,6 @@ #include "ntstatus.h" #define WIN32_NO_STATUS #include "windef.h" -#include "wine/unicode.h" #include "wine/debug.h" #include "ntdll_misc.h" #include "ddk/wdm.h" @@ -458,7 +457,7 @@ static BOOL parse_win_version( HANDLE hkey ) for (i = 0; i < ARRAY_SIZE(version_names); i++) { - if (strcmpW( version_names[i].name, name )) continue; + if (wcscmp( version_names[i].name, name )) continue; current_version = &VersionData[version_names[i].ver]; TRACE( "got win version %s\n", debugstr_w(version_names[i].name) ); return TRUE;
1
0
0
0
Alexandre Julliard : ntdll: Use wcsspn() instead of strspnW().
by Alexandre Julliard
31 Mar '20
31 Mar '20
Module: wine Branch: master Commit: 0d1b7737e37e67389f51bae3bf820b90f109f329 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0d1b7737e37e67389f51bae3…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Mar 31 11:53:34 2020 +0200 ntdll: Use wcsspn() instead of strspnW(). Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/loadorder.c | 4 ++-- dlls/ntdll/ntdll_misc.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/ntdll/loadorder.c b/dlls/ntdll/loadorder.c index f4a92fda49..291cc76031 100644 --- a/dlls/ntdll/loadorder.c +++ b/dlls/ntdll/loadorder.c @@ -130,7 +130,7 @@ static enum loadorder parse_load_order( const WCHAR *order ) while (*order) { - order += strspnW( order, separatorsW ); + order += wcsspn( order, separatorsW ); switch(*order) { case 'N': /* native */ @@ -207,7 +207,7 @@ static void add_load_order_set( WCHAR *entry ) while (*entry) { - entry += strspnW( entry, separatorsW ); + entry += wcsspn( entry, separatorsW ); end = entry + wcscspn( entry, separatorsW ); if (*end) *end++ = 0; if (*entry) diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h index 845efbbdbd..1249acbcdd 100644 --- a/dlls/ntdll/ntdll_misc.h +++ b/dlls/ntdll/ntdll_misc.h @@ -310,6 +310,7 @@ int WINAPIV NTDLL_swprintf( WCHAR *str, const WCHAR *format, ... ); #define wcstoul(s,e,b) NTDLL_wcstoul(s,e,b) #define wcslen(s) NTDLL_wcslen(s) #define wcscspn(s,r) NTDLL_wcscspn(s,r) +#define wcsspn(s,a) NTDLL_wcsspn(s,a) /* convert from straight ASCII to Unicode without depending on the current codepage */ static inline void ascii_to_unicode( WCHAR *dst, const char *src, size_t len )
1
0
0
0
Alexandre Julliard : ntdll: Use wcscspn() instead of strcspnW().
by Alexandre Julliard
31 Mar '20
31 Mar '20
Module: wine Branch: master Commit: 23bf63f9eb7546b4bb4a4bad03c7c83e6bac96b6 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=23bf63f9eb7546b4bb4a4bad…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Mar 31 11:52:07 2020 +0200 ntdll: Use wcscspn() instead of strcspnW(). Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/loadorder.c | 4 ++-- dlls/ntdll/ntdll_misc.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/ntdll/loadorder.c b/dlls/ntdll/loadorder.c index 090ca8d96e..f4a92fda49 100644 --- a/dlls/ntdll/loadorder.c +++ b/dlls/ntdll/loadorder.c @@ -144,7 +144,7 @@ static enum loadorder parse_load_order( const WCHAR *order ) else if (ret == LO_NATIVE) return LO_NATIVE_BUILTIN; break; } - order += strcspnW( order, separatorsW ); + order += wcscspn( order, separatorsW ); } return ret; } @@ -208,7 +208,7 @@ static void add_load_order_set( WCHAR *entry ) while (*entry) { entry += strspnW( entry, separatorsW ); - end = entry + strcspnW( entry, separatorsW ); + end = entry + wcscspn( entry, separatorsW ); if (*end) *end++ = 0; if (*entry) { diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h index 65e4088b03..845efbbdbd 100644 --- a/dlls/ntdll/ntdll_misc.h +++ b/dlls/ntdll/ntdll_misc.h @@ -309,6 +309,7 @@ int WINAPIV NTDLL_swprintf( WCHAR *str, const WCHAR *format, ... ); #define wcsrchr(s,c) NTDLL_wcsrchr(s,c) #define wcstoul(s,e,b) NTDLL_wcstoul(s,e,b) #define wcslen(s) NTDLL_wcslen(s) +#define wcscspn(s,r) NTDLL_wcscspn(s,r) /* convert from straight ASCII to Unicode without depending on the current codepage */ static inline void ascii_to_unicode( WCHAR *dst, const char *src, size_t len )
1
0
0
0
Alexandre Julliard : ntdll: Use wcslen() instead of strlenW().
by Alexandre Julliard
31 Mar '20
31 Mar '20
Module: wine Branch: master Commit: e003b9884edcccc417d41d30073b312648741aaa URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e003b9884edcccc417d41d30…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Mar 31 11:50:16 2020 +0200 ntdll: Use wcslen() instead of strlenW(). Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/actctx.c | 130 ++++++++++++++++++++++++------------------------ dlls/ntdll/atom.c | 5 +- dlls/ntdll/directory.c | 12 ++--- dlls/ntdll/env.c | 29 ++++++----- dlls/ntdll/loader.c | 27 +++++----- dlls/ntdll/loadorder.c | 10 ++-- dlls/ntdll/locale.c | 22 ++++---- dlls/ntdll/nt.c | 3 +- dlls/ntdll/ntdll_misc.h | 1 + dlls/ntdll/path.c | 23 ++++----- dlls/ntdll/printf.c | 5 +- dlls/ntdll/process.c | 12 ++--- dlls/ntdll/reg.c | 7 ++- dlls/ntdll/relay.c | 5 +- dlls/ntdll/resource.c | 2 +- dlls/ntdll/rtlstr.c | 9 ++-- 16 files changed, 147 insertions(+), 155 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=e003b9884edcccc417d4…
1
0
0
0
← Newer
1
2
3
4
5
6
7
8
9
...
100
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
Results per page:
10
25
50
100
200